Skip to content

Commit

Permalink
Collapsed code coverage data
Browse files Browse the repository at this point in the history
  • Loading branch information
Janos Bonic committed Sep 13, 2022
1 parent 6a6781a commit 4e2dd35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ jobs:
go generate
go test -coverprofile /tmp/coverage.out -json -v ./... 2>&1 | tee /tmp/gotest.log | gotestfmt
echo "# Code coverage summary" > /tmp/coverage.md
echo "|File|Package|Coverage|" >> /tmp/coverage.md
echo "|----|-------|--------|" >> /tmp/coverage.md
echo "|File|Type|Coverage|" >> /tmp/coverage.md
echo "|----|----|--------|" >> /tmp/coverage.md
go tool cover -func /tmp/coverage.out | sed -e 's/\s\s*/|/g' -e 's/^/|/g' -e 's/$/|/g' >> /tmp/coverage.md
cat /tmp/coverage.md
cat /tmp/coverage.md >> $GITHUB_STEP_SUMMARY
echo "::group::Code coverage summary"
go tool cover -func /tmp/coverage.out
echo "::endgroup::
- name: Upload test log
uses: actions/upload-artifact@v2
if: always()
Expand Down

0 comments on commit 4e2dd35

Please sign in to comment.