Skip to content

Commit

Permalink
Add code coverage (#11)
Browse files Browse the repository at this point in the history
* Fix macos workflow

* Now the macos and linux workflows are the same

* Add the staticcheck action on linux

* Mark all issues found by the static checker

* Add the reason everywhere, because it is mandatory

* add go test coverage

* test different threshold

* Lower threshold again
  • Loading branch information
arjenderijke authored Dec 10, 2023
1 parent bbc6cba commit 288a093
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,23 @@ jobs:
uses: dominikh/[email protected]
with:
version: "2023.1.6"


- name: Go test coverage
uses: gwatts/go-coverage-action@v1
id: coverage
with:
# Optional coverage threshold
# use fail-coverage to determine what should happen below this threshold
coverage-threshold: 25

# collect coverage for all packages beyond the one under test
cover-pkg: ./...

# Ignore code-generated files when calculating coverage totals
ignore-pattern: |
\.pb\.go$
\_string\.go$
- name: Build
run: go build -v ./...

Expand Down

0 comments on commit 288a093

Please sign in to comment.