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
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

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