Fix coverage calculation.

This commit is contained in:
David Himmelstrup 2020-08-27 18:36:59 +08:00
commit b9d3966366

View file

@ -71,8 +71,8 @@ jobs:
run: |
# Stack is required because cabal doesn't build docs for dependencies.
# Without those, coverage will not reach 100%
stack build
stack haddock 2>&1 | grep " in " | sort -hr > hpc/haddock.txt
stack build --haddock --only-dependencies
stack haddock 2>&1 | grep ") in " | sort -hr > hpc/haddock.txt
COVERAGE=$(awk '{good += $3; total += $5} END {printf "%.0f", good/total*100}' hpc/haddock.txt)
echo "\
{ \"schemaVersion\": 1, \