# HG changeset patch # User Thierry Florac # Date 1574867420 -3600 # Node ID 3ed12c7be8ffa41af1e4b332e4fd2da1b168ebd5 # Parent 73c12fd02e0331522bca82b4f2ce13cc44a77b08 Updated AWK path diff -r 73c12fd02e03 -r 3ed12c7be8ff .gitlab-ci.yml --- a/.gitlab-ci.yml Wed Nov 27 16:07:46 2019 +0100 +++ b/.gitlab-ci.yml Wed Nov 27 16:10:20 2019 +0100 @@ -26,12 +26,11 @@ test: stage: test script: - - apt-get install awk grep - pip install anybadge - mkdir ./coverage - ./bin/test --coverage coverage | tee ./coverage/coverage.log - - GLOBAL_COVER=$(grep -e '^[[:space:]]*[[:digit:]]\+[[:space:]]\+[[:digit:]]\+\%' ./coverage/coverage.log | \ - awk 'BEGIN { lines=0; cov=0 } \ + - GLOBAL_COVER=$(/bin/grep -e '^[[:space:]]*[[:digit:]]\+[[:space:]]\+[[:digit:]]\+\%' ./coverage/coverage.log | \ + /usr/bin/awk 'BEGIN { lines=0; cov=0 } \ { lines = lines + $1; cov = cov + $1 * $2 / 100 } \ END { printf "%.2f", cov / lines * 100 }') - anybadge --label=Coverage --file=./coverage/coverage.svg --value=$GLOBAL_COVER 20=red 40=orange 60=yellow 80=green