Including tests for the Anki 2.1.x version.

This commit is contained in:
tomasgodoi 2017-08-29 17:16:06 -03:00
parent e59347a071
commit 0b4948823b
7 changed files with 29 additions and 3 deletions

View File

@ -8,8 +8,12 @@ services:
python: python:
- "2.7" - "2.7"
install: install:
- docker build -f tests/docker/Dockerfile -t txgio/anki-connect . - docker build -f tests/docker/$ANKI_VERSION/Dockerfile -t txgio/anki-connect:$ANKI_VERSION .
script: script:
- docker run -ti -d --rm -p 8888:8765 -e ANKICONNECT_BIND_ADDRESS=0.0.0.0 txgio/anki-connect - docker run -ti -d --rm -p 8888:8765 -e ANKICONNECT_BIND_ADDRESS=0.0.0.0 txgio/anki-connect:$ANKI_VERSION
- ./tests/scripts/wait-up.sh http://docker:8888 - ./tests/scripts/wait-up.sh http://docker:8888
- python -m unittest discover -s tests -v - python -m unittest discover -s tests -v
env:
- ANKI_VERSION=2.0.x
- ANKI_VERSION=2.1.x

View File

@ -0,0 +1,14 @@
FROM txgio/anki:2.1.0beta14
RUN apt-get update && \
apt-get install -y xvfb
COPY AnkiConnect.py /data/addons21/AnkiConnect.py
COPY tests/docker/prefs21.db /data/prefs21.db
ADD tests/docker/entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["anki", "-b", "/data"]

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -e
# Start Xvfb
Xvfb -ac -screen scrn 1280x2000x24 :99.0 &
export DISPLAY=:99.0
exec "$@"

Binary file not shown.