Including tests for the Anki 2.1.x version.
This commit is contained in:
parent
e59347a071
commit
0b4948823b
10
.travis.yml
10
.travis.yml
@ -8,8 +8,12 @@ services:
|
||||
python:
|
||||
- "2.7"
|
||||
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:
|
||||
- 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
|
||||
- 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
|
14
tests/docker/2.1.x/Dockerfile
Normal file
14
tests/docker/2.1.x/Dockerfile
Normal 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"]
|
8
tests/docker/2.1.x/entrypoint.sh
Executable file
8
tests/docker/2.1.x/entrypoint.sh
Executable 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 "$@"
|
BIN
tests/docker/2.1.x/prefs21.db
Normal file
BIN
tests/docker/2.1.x/prefs21.db
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user