Skip to content

Commit

Permalink
Add coverage report and badge generation to go-test.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Th3Shadowbroker committed Mar 15, 2024
1 parent 6250c3c commit dff0147
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,14 @@ jobs:
MONGO_HOST: localhost:27017
MONGO_IMAGE: mongo
MONGO_TAG: 7.0.5-rc0
run: go test -v ./...
run: go test -v ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...

- name: Generate coverage report
run: go tool cover -html=cover.out -o=/out/reports/coverage-report.html

- name: Check test coverage
uses: vladopajic/go-test-coverage@v2
with:
profile: cover.out
local-prefix: github.com/telekom/pubsub-horizon-vortex
badge-file-name: /out/badges/coverage.svg

0 comments on commit dff0147

Please sign in to comment.