-
Notifications
You must be signed in to change notification settings - Fork 10
/
local_ci.cfg
39 lines (35 loc) · 1.21 KB
/
local_ci.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is a buildout for gitlab-ci
[buildout]
extends =
local_develop.cfg
parts +=
test
coverage
coverage-test
vardir = ${buildout:directory}/var
logdir = ${buildout:vardir}/log
backupdir = ${buildout:vardir}/backup
[test]
recipe = collective.xmltestreport
defaults = ['--auto-color', '--auto-progress', '--xml', '--ignore_dir=components', '--ignore_dir=node_modules', '-v']
[coverage-test]
recipe = collective.recipe.template
input = inline:
#!/bin/sh
export TZ=UTC
# Remove old results
echo "Erase old coverage results."
${buildout:directory}/bin/coverage erase
# Collect test coverage results for all packages
echo "Run test coverage analysis for all packages."
${buildout:directory}/bin/coverage run bin/test $*
echo "Create test coverage report."
# Combine all package analysis
bin/coverage combine
${buildout:directory}/bin/coverage report -m
# Generates a "coverage.xml" file that Jenkins can read and process from the
# ".coverage" file that the coverage report created.
${buildout:directory}/bin/coverage html -i
echo "Test coverage report finished. See parts/test/htmlreport/index.html"
output = ${buildout:directory}/bin/coverage-test
mode = 755