Including travis support to execute tests.

This commit is contained in:
tomasgodoi 2017-07-06 00:14:04 -03:00
parent da7c1c8a45
commit 6b81ef2f33
3 changed files with 22 additions and 0 deletions

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
sudo: required
services:
- docker
language: python
python:
- "2.7"
install:
- docker build -f tests/Dockerfile -t txgio/anki-connect .
script:
- curl localhost:8765 -X POST -s -d '{"action": "version"}'

12
tests/Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM txgio/anki
RUN mkdir -p /home/anki-user/Documents/Anki/addons
COPY AnkiConnect.py /home/anki-user/Documents/Anki/addons
# Required if you want to access it from another IP address.
# RUN sed -i 's/127.0.0.1/0.0.0.0/' /home/anki-user/Documents/Anki/addons/AnkiConnect.py
COPY tests/prefs.db /home/anki-user/Documents/Anki/prefs.db
CMD /bin/bash -c "(/usr/bin/ibus-daemon -xd; /usr/bin/anki;)"

BIN
tests/prefs.db Normal file

Binary file not shown.