Skip to content

Commit

Permalink
Add coverage + codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Jan 14, 2025
1 parent 3f570c1 commit 1fb1f47
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@ jobs:
run: mise run test

- name: Verify golden files
if: env.GO_NOT_LATEST == 'false'
if: env.MISE_ENV == 'stable'
run: make diff-testdata

- name: Generate coverage
run: mise run coverage
- name: Upload to CodeCov
uses: codecov/codecov-action@v5
with:
files: ./cover.unsafe.out,./cover.safe.out

lint:
name: lint
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ run = "go build ./..."
description = "Run Go tests"
run = "go test ./..."

[tasks.cover]
description = "Run Go tests with coverage"
run = "go test -coverprofile cover.out ./..."

[tasks.lint]
description = "Run golangci-lint"
run = "golangci-lint run ./..."
Expand Down
4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
comment: false
ignore:
# test runner logic for integration tests against stdlib
- 'internal/cmptest/*.go'

0 comments on commit 1fb1f47

Please sign in to comment.