From 564f4868360050cfb39b82b935885625876657d5 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Tue, 3 Sep 2019 15:50:38 +0200 Subject: [PATCH 1/2] add coverage for legacy tests --- .github/workflows/test.yaml | 14 ++++++++++++++ Taskfile.yml | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) 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 From 2c78712abefcdb50769b5946fd8caba9584bac77 Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Tue, 3 Sep 2019 16:06:44 +0200 Subject: [PATCH 2/2] forgot --- .codecov.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: