Skip to content

Commit

Permalink
cicd(test): add "-coverpkg=./..." to measure the test coverage of pac…
Browse files Browse the repository at this point in the history
…kages that are imported in different packages
  • Loading branch information
ahuigo committed Jun 28, 2024
1 parent 5090915 commit eeb7d8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: diff -u <(echo -n) <(go fmt $(go list ./...))

- name: Test
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cache-dependency-path: go.sum

- name: Test
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic
run: go test ./... -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./...

- name: Coverage
run: bash <(curl -s https://codecov.io/bash)

0 comments on commit eeb7d8e

Please sign in to comment.