mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-05 13:46:42 +00:00
Add dummy go files for test only package, to mitigate golang/go#27333 (#1480)
* Add dummy go files for test only package, to mitigate golang/go#27333 * Stop ignoring errors when producing the coverage * Add comments explaining the dummy go files * Make the coverage output non-json
This commit is contained in:
parent
97be133cee
commit
e7f9606683
3
.github/workflows/go.yml
vendored
3
.github/workflows/go.yml
vendored
@ -63,8 +63,7 @@ jobs:
|
||||
go-version: 1.15
|
||||
|
||||
- name: Create coverage file
|
||||
# Because of https://github.com/golang/go/issues/27333 this seem to "fail" even though nothing is wrong, so ignore the failure
|
||||
run: go test -json -covermode=atomic -coverpkg=./... -coverprofile coverage.txt ./... || true
|
||||
run: go test -covermode=atomic -coverpkg=./... -coverprofile coverage.txt ./...
|
||||
|
||||
- name: Upload coverage file
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
4
app/protocol/flows/testing/testing.go
Normal file
4
app/protocol/flows/testing/testing.go
Normal file
@ -0,0 +1,4 @@
|
||||
package testing
|
||||
|
||||
// Because of a bug in Go coverage fails if you have packages with test files only. See https://github.com/golang/go/issues/27333
|
||||
// So this is a dummy non-test go file in the package.
|
4
testing/integration/integration.go
Normal file
4
testing/integration/integration.go
Normal file
@ -0,0 +1,4 @@
|
||||
package integration
|
||||
|
||||
// Because of a bug in Go coverage fails if you have packages with test files only. See https://github.com/golang/go/issues/27333
|
||||
// So this is a dummy non-test go file in the package.
|
Loading…
x
Reference in New Issue
Block a user