diff --git a/.codecov.yml b/.codecov.yml index 279a3159537..63a6c197ded 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,7 +1,7 @@ comment: off -ignore: - - legacy/**/* +# ignore: +# - legacy/**/* coverage: status: diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4ceaf9ff539..166cb2ac226 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -76,6 +76,20 @@ jobs: file: ./coverage_unit.txt flags: unit + - name: Send legacy tests coverage to Codecov + # Since secrets aren't available on forks, we only + # upload coverage on `push`. This might change if + # Codecov whitelists GitHub, lifting the need + # for a token. + if: > + matrix.operating-system != 'windows-2019' && + github.event_name == 'push' + uses: codecov/codecov-action@v1.0.2 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: ./coverage_legacy.txt + flags: unit + - name: Send integration tests coverage to Codecov # Since secrets aren't available on forks, we only # upload coverage on `push`. This might change if diff --git a/Taskfile.yml b/Taskfile.yml index b013962768d..d8b30149aa2 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -32,7 +32,7 @@ tasks: test-legacy: desc: Run tests for the `legacy` package cmds: - - go test {{ default "-v -failfast" .GOFLAGS }} ./legacy/... + - go test {{ default "-v -failfast" .GOFLAGS }} -coverprofile=coverage_legacy.txt ./legacy/... test-unit-race: desc: Run unit tests only with race condition detection