test: try coverpkg

This commit is contained in:
Sun Yimin 2022-07-12 08:38:01 +08:00 committed by GitHub
parent 189f2217c3
commit e4d02321b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,10 +36,10 @@ jobs:
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
- name: Test with Coverage
run: go test -v -short -coverprofile=coverage1.txt -covermode=atomic ./...
run: go test -coverpkg=./... -v -short -coverprofile=coverage1.txt -covermode=atomic ./...
- name: Test Generic
run: go test -v -short -tags generic -coverprofile=coverage2.txt -covermode=atomic ./...
run: go test -coverpkg=./... -v -short -tags generic -coverprofile=coverage2.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3