Skip to content

Commit dba2d34

Browse files
author
Massimiliano Pippi
authored
[skip changelog] Add coverage for legacy tests (#390)
* add coverage for legacy tests
1 parent ec96899 commit dba2d34

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.codecov.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
comment: off
22

3-
ignore:
4-
- legacy/**/*
3+
# ignore:
4+
# - legacy/**/*
55

66
coverage:
77
status:

.github/workflows/test.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,20 @@ jobs:
7676
file: ./coverage_unit.txt
7777
flags: unit
7878

79+
- name: Send legacy tests coverage to Codecov
80+
# Since secrets aren't available on forks, we only
81+
# upload coverage on `push`. This might change if
82+
# Codecov whitelists GitHub, lifting the need
83+
# for a token.
84+
if: >
85+
matrix.operating-system != 'windows-2019' &&
86+
github.event_name == 'push'
87+
uses: codecov/[email protected]
88+
with:
89+
token: ${{secrets.CODECOV_TOKEN}}
90+
file: ./coverage_legacy.txt
91+
flags: unit
92+
7993
- name: Send integration tests coverage to Codecov
8094
# Since secrets aren't available on forks, we only
8195
# upload coverage on `push`. This might change if

Taskfile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tasks:
3232
test-legacy:
3333
desc: Run tests for the `legacy` package
3434
cmds:
35-
- go test {{ default "-v -failfast" .GOFLAGS }} ./legacy/...
35+
- go test {{ default "-v -failfast" .GOFLAGS }} -coverprofile=coverage_legacy.txt ./legacy/...
3636

3737
test-unit-race:
3838
desc: Run unit tests only with race condition detection

0 commit comments

Comments
 (0)