Fix postgrest-coverage throwing error when installed with nix-env

This commit is contained in:
Wolfgang Walther
2020-12-30 16:38:13 +01:00
committed by Remo Rechkemmer
parent 568477b6af
commit 93541035f6
+3 -3
View File
@@ -6,6 +6,7 @@
, curl
, devCabalOptions
, ghc
, glibcLocales
, gnugrep
, haskell
, hpc-codecov
@@ -176,6 +177,7 @@ let
''
env="$(cat ${postgrest.env})"
export PATH="$env/bin:$PATH"
export LOCALE_ARCHIVE="${glibcLocales}/lib/locale/locale-archive"
# clean up previous coverage reports
mkdir -p coverage
@@ -227,9 +229,7 @@ let
${hpc-codecov}/bin/hpc-codecov --mix=.hpc --out=coverage/codecov.json coverage/postgrest.tix
# create html and stdout reports
# TODO: The markup command fails when run outside nix-shell (i.e. in CI!)
# Need to fix it properly in the future instead of adding the || true
${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix || true
${ghc}/bin/hpc markup --destdir=coverage coverage/postgrest.tix
echo "file://$(pwd)/coverage/hpc_index.html"
${ghc}/bin/hpc report coverage/postgrest.tix "$@"
fi