Skip to content

Commit

Permalink
fix: coverage
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <[email protected]>
  • Loading branch information
gfanton committed Nov 7, 2024
1 parent 9cdaac3 commit 9adfc59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,17 @@ jobs:
mkdir -p "$GOCOVERDIR" "$TXTARCOVERDIR" "$COVERDIR"
# Craft a filter flag based on the module path to avoid expanding coverage on unrelated tags.
export filter="-pkg=github.com/gnolang/gno/${{ inputs.modulepath }}/..."
export coverpkg="github.com/gnolang/gno/${{ inputs.modulepath }}/..."
export filter="-pkg=$coverpkg"
# XXX: Simplify coverage of txtar - the current setup is a bit
# confusing and meticulous. There will be some improvements in Go
# 1.23 regarding coverage, so we can use this as a workaround until
# then.
go test -covermode=atomic -timeout ${{ inputs.tests-timeout }} ./... -test.gocoverdir=$GOCOVERDIR
go test -coverpkg=$coverpkg \
-covermode=atomic \
-timeout ${{ inputs.tests-timeout }} \
./... $coverpkg -test.gocoverdir=$GOCOVERDIR
# Print results
(set +x; echo 'go coverage results:')
Expand Down

0 comments on commit 9adfc59

Please sign in to comment.