Skip to content

Commit

Permalink
Extend code coverage to be more meaningful (#278)
Browse files Browse the repository at this point in the history
I noticed two issues with existing code coverage stats:

1. Only in-module data are collected, e.g. tests in the
`github.com/pulumi/pulumi-go-provider/tests` module don't output
coverage data for `github.com/pulumi/pulumi-go-provider`
2. The `examples` and `tests` folders have coverage data for its
resource implementation code.

This PR changes the arguments to collect data for all submodules of
`github.com/pulumi/pulumi-go-provider` but to exclude `examples` and
`tests/grpc` in codecov itself.
  • Loading branch information
mikhailshilkov authored Sep 24, 2024
2 parents ade261c + 0b7446e commit 9378ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build build_examples install_examples lint lint-copyright lint-golang

GO_TEST_FLAGS=-race -coverprofile="coverage.txt"
GO_TEST_FLAGS=-race -coverprofile="coverage.txt" -coverpkg=github.com/pulumi/pulumi-go-provider/...
GO_TEST=go test ${GO_TEST_FLAGS}

build:
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ coverage:
patch:
default:
informational: true
ignore:
# Examples implementation code should not count against coverage.
- "examples/"

0 comments on commit 9378ea6

Please sign in to comment.