Skip to content

Commit 7b3f74d

Browse files
authored
ci: upgrade codecov-action v4 → v5, fix coverage upload
* ci: upgrade codecov-action v4 → v5, add token, enable fail_ci_if_error * ci: add coverage file verification before codecov upload
1 parent 2a8e5cf commit 7b3f74d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,19 @@ jobs:
3636
shell: bash
3737
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
3838

39-
- name: Upload coverage
40-
uses: codecov/codecov-action@v4
39+
- name: Verify coverage file
4140
if: matrix.os == 'ubuntu-latest'
41+
run: ls -la coverage.txt && echo "$(wc -l < coverage.txt) lines"
42+
43+
- name: Upload coverage to Codecov
44+
if: matrix.os == 'ubuntu-latest'
45+
uses: codecov/codecov-action@v5
4246
with:
47+
token: ${{ secrets.CODECOV_TOKEN }}
4348
files: ./coverage.txt
44-
fail_ci_if_error: false
49+
flags: unittests
50+
name: codecov-naga
51+
fail_ci_if_error: true
4552

4653
lint:
4754
name: Lint

0 commit comments

Comments
 (0)