diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0825208..06638ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,21 +1,19 @@ image: python:2.7.12-slim before_script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - coverage erase + - bash ci-scripts/before.sh variables: COVERAGE_FILE: .coverage + ONE_AUTH: "/tmp/test-one-auth" + ONE_XMLRPC: "http://localhost:2633/RPC2" pytest: stage: test script: - - ONE_XMLRPC="http://localhost:2633/RPC2" python setup.py test + - python setup.py test tags: - docker after_script: - - coverage combine - - coverage report - - coverage html + - bash ci-scripts/after.sh diff --git a/ci-scripts/after.sh b/ci-scripts/after.sh new file mode 100644 index 0000000..61dc4d4 --- /dev/null +++ b/ci-scripts/after.sh @@ -0,0 +1,4 @@ +#!/bin/bash +coverage combine +coverage report +coverage html diff --git a/ci-scripts/before.sh b/ci-scripts/before.sh new file mode 100644 index 0000000..6b73091 --- /dev/null +++ b/ci-scripts/before.sh @@ -0,0 +1,5 @@ +#!/bin/bash +echo 'someuser:sometoken' > ${ONE_AUTH} +pip install -r requirements.txt +pip install -r test-requirements.txt +coverage erase