gitlab-ci: setup ONE_AUTH for tests

master
Justin Riley 2016-10-11 22:46:25 -04:00
parent 9246a4b813
commit 40dfd97292
3 changed files with 14 additions and 7 deletions

View File

@ -1,21 +1,19 @@
image: python:2.7.12-slim image: python:2.7.12-slim
before_script: before_script:
- pip install -r requirements.txt - bash ci-scripts/before.sh
- pip install -r test-requirements.txt
- coverage erase
variables: variables:
COVERAGE_FILE: .coverage COVERAGE_FILE: .coverage
ONE_AUTH: "/tmp/test-one-auth"
ONE_XMLRPC: "http://localhost:2633/RPC2"
pytest: pytest:
stage: test stage: test
script: script:
- ONE_XMLRPC="http://localhost:2633/RPC2" python setup.py test - python setup.py test
tags: tags:
- docker - docker
after_script: after_script:
- coverage combine - bash ci-scripts/after.sh
- coverage report
- coverage html

4
ci-scripts/after.sh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
coverage combine
coverage report
coverage html

5
ci-scripts/before.sh Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
echo 'someuser:sometoken' > ${ONE_AUTH}
pip install -r requirements.txt
pip install -r test-requirements.txt
coverage erase