A .travis.yml => .travis.yml +10 -0
@@ 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"}'<
\ No newline at end of file
A tests/Dockerfile => tests/Dockerfile +12 -0
@@ 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;)"<
\ No newline at end of file
A tests/prefs.db => tests/prefs.db +0 -0