~foosoft/anki-connect

bddef5eabdfc2e7a1659089e0f9a2fdbc3e1af46 — Alex Yatskov 6 years ago f109f89
temporarily remove travis until I get it working properly
8 files changed, 0 insertions(+), 91 deletions(-)

D .travis.yml
D tests/docker/2.0.x/Dockerfile
D tests/docker/2.0.x/entrypoint.sh
D tests/docker/2.0.x/prefs.db
D tests/docker/2.1.x/Dockerfile
D tests/docker/2.1.x/entrypoint.sh
D tests/docker/2.1.x/prefs21.db
D tests/scripts/wait-up.sh
D .travis.yml => .travis.yml +0 -19
@@ 1,19 0,0 @@
sudo: required
language: python
addons:
  hosts:
    - docker
services:
  - docker
python:
  - "2.7"
install:
  - 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:$ANKI_VERSION
  - ./tests/scripts/wait-up.sh http://docker:8888
  - python -m unittest discover -s tests -v

env:
  - ANKI_VERSION=2.0.x
  - ANKI_VERSION=2.1.x
\ No newline at end of file

D tests/docker/2.0.x/Dockerfile => tests/docker/2.0.x/Dockerfile +0 -14
@@ 1,14 0,0 @@
FROM txgio/anki:2.0.45

RUN apt-get update && \
    apt-get install -y xvfb

COPY AnkiConnect.py /data/addons/AnkiConnect.py

COPY tests/docker/2.0.x/prefs.db /data/prefs.db

ADD tests/docker/2.0.x/entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

CMD ["anki", "-b", "/data"]
\ No newline at end of file

D tests/docker/2.0.x/entrypoint.sh => tests/docker/2.0.x/entrypoint.sh +0 -8
@@ 1,8 0,0 @@
#!/usr/bin/env bash
set -e

# Start Xvfb
Xvfb -ac -screen scrn 1280x2000x24 :99.0 &
export DISPLAY=:99.0

exec "$@"
\ No newline at end of file

D tests/docker/2.0.x/prefs.db => tests/docker/2.0.x/prefs.db +0 -0
D tests/docker/2.1.x/Dockerfile => tests/docker/2.1.x/Dockerfile +0 -14
@@ 1,14 0,0 @@
FROM txgio/anki:2.1.0beta14

RUN apt-get update && \
    apt-get install -y xvfb

COPY AnkiConnect.py /data/addons21/AnkiConnect/__init__.py

COPY tests/docker/2.1.x/prefs21.db /data/prefs21.db

ADD tests/docker/2.1.x/entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]

CMD ["anki", "-b", "/data"]
\ No newline at end of file

D tests/docker/2.1.x/entrypoint.sh => tests/docker/2.1.x/entrypoint.sh +0 -8
@@ 1,8 0,0 @@
#!/usr/bin/env bash
set -e

# Start Xvfb
Xvfb -ac -screen scrn 1280x2000x24 :99.0 &
export DISPLAY=:99.0

exec "$@"
\ No newline at end of file

D tests/docker/2.1.x/prefs21.db => tests/docker/2.1.x/prefs21.db +0 -0
D tests/scripts/wait-up.sh => tests/scripts/wait-up.sh +0 -28
@@ 1,28 0,0 @@
#!/usr/bin/env bash
set -e

if [ $# -lt 1 ]; then
    printf "First parameter URL required.\n"
    exit 1
fi

COUNTER=0
STEP_SIZE=1
MAX_SECONDS=${2:-10} # Wait 10 seconds if parameter not provided
MAX_RETRIES=$(( $MAX_SECONDS / $STEP_SIZE))

URL=$1

printf "Waiting URL: "$URL"\n"

until $(curl --insecure --output /dev/null --silent --fail $URL) || [ $COUNTER -eq $MAX_RETRIES ]; do
    printf '.'
    sleep $STEP_SIZE
    COUNTER=$(($COUNTER + 1))
done
if [ $COUNTER -eq $MAX_RETRIES ]; then
    printf "\nTimeout after "$(( $COUNTER * $STEP_SIZE))" second(s).\n"
    exit 2
else
    printf "\nUp successfully after "$(( $COUNTER * $STEP_SIZE))" second(s).\n"
fi
\ No newline at end of file

Do not follow this link