diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7aa3225..2515994 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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()