Skip to content

Commit c034116

Browse files
chore: codecoverage report ignoring cross package tests after moving test files
1 parent c8de505 commit c034116

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/go.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
1110
build:
1211
runs-on: ubuntu-latest
1312
steps:
@@ -21,10 +20,16 @@ jobs:
2120
- name: Build
2221
run: go build -v ./...
2322

24-
- name: Test
25-
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
23+
- name: Test (with cross-package coverage)
24+
run: |
25+
go test ./... \
26+
-v \
27+
-race \
28+
-covermode=atomic \
29+
-coverpkg=./... \
30+
-coverprofile=coverage.txt
2631
2732
- name: Upload coverage to Codecov
2833
uses: codecov/codecov-action@v3
2934
env:
30-
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
35+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)