equal
deleted
inserted
replaced
1 image: python:3.5 |
1 image: python:3.5 |
2 |
2 |
3 stages: |
3 stages: |
4 - test |
|
5 - dist |
4 - dist |
6 - quality |
5 - quality |
7 |
6 |
8 cache: |
7 cache: |
9 paths: |
8 paths: |
20 bootstrap: |
19 bootstrap: |
21 stage: .pre |
20 stage: .pre |
22 script: |
21 script: |
23 - python3.5 bootstrap.py --buildout-version=2.12.0 |
22 - python3.5 bootstrap.py --buildout-version=2.12.0 |
24 - ./bin/buildout |
23 - ./bin/buildout |
25 |
|
26 test: |
|
27 stage: test |
|
28 script: |
|
29 - pip install anybadge |
|
30 - mkdir ./coverage |
|
31 - ./bin/test --coverage coverage | tee ./coverage/coverage.log |
|
32 - GLOBAL_COVER=$(/bin/grep -e '^[[:space:]]*[[:digit:]]\+[[:space:]]\+[[:digit:]]\+\%' ./coverage/coverage.log | |
|
33 awk 'BEGIN { lines=0; cov=0 } |
|
34 { lines = lines + $1; cov = cov + $1 * $2 / 100 } |
|
35 END { printf "%.2f", cov / lines * 100 }') |
|
36 - anybadge --label=Coverage --file=./coverage/coverage.svg --value=$GLOBAL_COVER 20=red 40=orange 60=yellow 80=green |
|
37 - echo "Global tests coverage is $GLOBAL_COVER %" |
|
38 artifacts: |
|
39 paths: |
|
40 - ./coverage/ |
|
41 |
24 |
42 dist: |
25 dist: |
43 stage: dist |
26 stage: dist |
44 script: |
27 script: |
45 - ./bin/buildout setup setup.py clean --all sdist bdist_egg bdist_wheel |
28 - ./bin/buildout setup setup.py clean --all sdist bdist_egg bdist_wheel |