We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f09cd4 commit 93229e1Copy full SHA for 93229e1
scripts/coverage.sh
@@ -0,0 +1,29 @@
1
+#!/usr/bin/env bash
2
+set -euo pipefail
3
+
4
+open_browser() {
5
+ if command -v open >/dev/null; then
6
+ open "$1"
7
+ elif command -v xdg-open >/dev/null; then
8
+ xdg-open "$1"
9
+ elif command -v start >/dev/null; then
10
+ start "$1"
11
+ else
12
+ echo "Open the report manually: $1"
13
+ fi
14
+}
15
16
+cabal clean
17
+cabal test all --enable-coverage
18
19
+HPCDIRS=$(find . -type f -name '*.mix' -exec dirname {} \; | xargs dirname | sort -u | sed 's/^/--hpcdir=/')
20
+TIX=$(find . -name '*.tix' | head -n1)
21
22
+hpc markup \
23
+ $HPCDIRS \
24
+ --exclude=dataframe:Dataframe \
25
+ $TIX \
26
+ --destdir=coverage-html \
27
+ --reset
28
29
+open_browser ./coverage-html/hpc_index.html
0 commit comments