diff --git a/.travis.yml b/.travis.yml index a1cca5e..144ec85 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,10 @@ language: python python: - - "2.7" + - "3.5" install: - - cp fafbot.conf.example fafbot.conf - - wget https://raw.githubusercontent.com/FAForever/server/develop/passwords.py.example -O passwords.py + - cp config.ini.example config.ini - pip install -r requirements.txt - pip install pytest-cov python-coveralls diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3994ebb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.5 + +RUN pip install --upgrade pip +RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +COPY requirements.txt /tmp/requirements.txt + +RUN pip install --upgrade --trusted-host content.dev.faforever.com -r /tmp/requirements.txt + +ADD . /code/ +WORKDIR /code/ + +VOLUME /config + +# irc3 searches for the plugin files in the folder of the configuration file +CMD cp /config/config.ini ./config.ini && irc3 config.ini \ No newline at end of file diff --git a/README.md b/README.md index 6efd97e..27b3b32 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # FA Forever - IRC bot -[![Build Status](https://travis-ci.org/FAForever/fafbot.svg?branch=master)](https://travis-ci.org/FAForever/fafbot) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/FAForever/fafbot/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/FAForever/fafbot/?branch=master) +[![Build Status](https://travis-ci.org/FAForever/QAI.svg?branch=master)](https://travis-ci.org/FAForever/QAI) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/FAForever/QAI/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/FAForever/QAI/?branch=master) This is the source code for the [Forged Alliance Forever](http://www.faforever.com/) IRC bot. diff --git a/requirements.txt b/requirements.txt index 8bd4731..4f63652 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,4 @@ -aiohttp -aiomysql -configobj -irc3 -pytest -slackclient -websockets \ No newline at end of file +aiohttp==2.0.7 +irc3==1.0.0 +pytest==3.0.7 +slackclient==1.0.5 \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_links.py b/tests/test_links.py new file mode 100644 index 0000000..7532608 --- /dev/null +++ b/tests/test_links.py @@ -0,0 +1,9 @@ +from links import LINKS, LINKS_SYNONYMES, WIKI_LINKS, WIKI_LINKS_SYNONYMES, OTHER_LINKS + + +def test_existance(): + assert isinstance(LINKS, dict) + assert isinstance(LINKS_SYNONYMES, dict) + assert isinstance(WIKI_LINKS, dict) + assert isinstance(WIKI_LINKS_SYNONYMES, dict) + assert isinstance(OTHER_LINKS, dict) diff --git a/tests/test_taunts.py b/tests/test_taunts.py new file mode 100644 index 0000000..d637683 --- /dev/null +++ b/tests/test_taunts.py @@ -0,0 +1,7 @@ +from taunts import TAUNTS, SPAM_PROTECT_TAUNTS, KICK_TAUNTS + + +def test_existance(): + assert isinstance(TAUNTS, list) + assert isinstance(SPAM_PROTECT_TAUNTS, list) + assert isinstance(KICK_TAUNTS, list)