Skip to content

Commit c0210a5

Browse files
committed
ci: Show coverage for all packages
We have test utils in other packages that are not shown as tested, while they definitely are.
1 parent 9b5f6a0 commit c0210a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ jobs:
3030
- name: Checkout code
3131
uses: actions/checkout@v4
3232
- name: Test
33-
run: sudo go test -v -cover -coverprofile=coverage.out ./...
33+
run: sudo go test -v -cover -coverprofile=coverage.out -coverpkg=./... ./...
3434
- name: Test with Address Sanitizer
3535
env:
3636
GO_PAM_TEST_WITH_ASAN: true
3737
CGO_CFLAGS: "-O0 -g3 -fno-omit-frame-pointer"
3838
run: |
3939
# Do not run sudo-requiring go tests because as PAM has some leaks in 22.04
40-
go test -v -asan -cover -coverprofile=coverage-asan-tx.out -gcflags=all="-N -l"
40+
go test -v -asan -cover -coverprofile=coverage-asan-tx.out -coverpkg=./... -gcflags=all="-N -l"
4141
4242
# Run the rest of tests normally
43-
sudo go test -v -cover -coverprofile=coverage-asan-module.out -asan -gcflags=all="-N -l" -run Module
44-
sudo go test -C cmd -coverprofile=coverage-asan.out -v -asan -gcflags=all="-N -l" ./...
43+
sudo go test -v -cover -coverprofile=coverage-asan-module.out -coverpkg=./... -asan -gcflags=all="-N -l" -run Module
44+
sudo go test -C cmd -coverprofile=coverage-asan.out -v -coverpkg=./... -asan -gcflags=all="-N -l" ./...
4545
- name: Generate example module
4646
run: |
4747
rm -f example-module/pam_go.so

0 commit comments

Comments
 (0)