.gitlab-ci.yml
changeset 433 3e1e16d5bbaf
parent 432 a5ac0ef9b40b
child 439 d2a70e493aa8
equal deleted inserted replaced
432:a5ac0ef9b40b 433:3e1e16d5bbaf
    24         - ./bin/buildout
    24         - ./bin/buildout
    25 
    25 
    26 test:
    26 test:
    27     stage: test
    27     stage: test
    28     script:
    28     script:
    29         - ./bin/test
    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/
    30 
    41 
    31 dist:
    42 dist:
    32     stage: dist
    43     stage: dist
    33     script:
    44     script:
    34         - ./bin/buildout setup setup.py clean --all sdist bdist_egg bdist_wheel
    45         - ./bin/buildout setup setup.py clean --all sdist bdist_egg bdist_wheel