equal
deleted
inserted
replaced
28 script: |
28 script: |
29 - pip install anybadge |
29 - pip install anybadge |
30 - mkdir ./coverage |
30 - mkdir ./coverage |
31 - ./bin/test --coverage coverage | tee ./coverage/coverage.log |
31 - ./bin/test --coverage coverage | tee ./coverage/coverage.log |
32 - GLOBAL_COVER=$(/bin/grep -e '^[[:space:]]*[[:digit:]]\+[[:space:]]\+[[:digit:]]\+\%' ./coverage/coverage.log | \ |
32 - GLOBAL_COVER=$(/bin/grep -e '^[[:space:]]*[[:digit:]]\+[[:space:]]\+[[:digit:]]\+\%' ./coverage/coverage.log | \ |
33 /usr/bin/awk 'BEGIN { lines=0; cov=0 } \ |
33 mawk 'BEGIN { lines=0; cov=0 } \ |
34 { lines = lines + $1; cov = cov + $1 * $2 / 100 } \ |
34 { lines = lines + $1; cov = cov + $1 * $2 / 100 } \ |
35 END { printf "%.2f", cov / lines * 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 |
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 %" |
37 - echo "Global tests coverage is $GLOBAL_COVER %" |
38 artifacts: |
38 artifacts: |
39 paths: |
39 paths: |
40 - ./coverage/ |
40 - ./coverage/ |