add coverage report

This commit is contained in:
Antoine Legrand 2017-06-20 11:30:27 +02:00
parent 90ed0c28be
commit 851686dd0b
7 changed files with 58 additions and 18 deletions

View file

@ -64,13 +64,24 @@ local jobs = {
// Unit-tests
local unittest_stage = baseJob.QuayTest {
stage: stages.unit_tests },
local pytest_cmd = 'py.test --cov="." --cov-report=html --cov-report=term-missing' +
' --timeout=3600 --verbose -x --color=no --show-count ',
'unit-tests': unittest_stage {
coverage: @"/^TOTAL.*\s+(\d+\%)\s*$/",
script: [
'py.test --timeout=7200 --verbose --show-count ./ --color=no -x'] },
pytest_cmd + ' ./',],
after_script: [
'cp -r $QUAYDIR/htmlcov/ $CI_PROJECT_DIR/coverage'
],
artifacts: {
paths: ['coverage',]
}
},
'registry-tests': unittest_stage {
script: [
'py.test --timeout=7200 --verbose --show-count ./test/registry_tests.py --color=no -x'] },
script: [ pytest_cmd + ' ./test/registry_tests.py'],
coverage: @"/^TOTAL.*\s+(\d+\%)\s*$/",
},
// UI tests
'karma-tests': unittest_stage {
@ -85,6 +96,7 @@ local jobs = {
// Unit-tests with real databases
local db_stage = { stage: stages.unit_tests },
local dbname = 'quay',
postgres: db_stage + baseJob.dbTest('postgresql',
image='postgres:9.6',
env={ POSTGRES_PASSWORD: dbname, POSTGRES_USER: dbname }),