Skip to content

Commit 840f6bc

Browse files
committed
use codecov/codecov-action for uploading coverage reports
Devel::Cover::Report::Codecov is deprecated. Instead, use the codecovbash report type to generate the json to upload, and upload it using codecov/codecov-action.
1 parent aa8e65b commit 840f6bc

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,19 @@ jobs:
7272
with:
7373
install: |
7474
Devel::Cover
75-
Devel::Cover::Report::Codecov
7675
Devel::Cover::Report::Codecovbash
7776
sudo: false
7877
- name: Run tests with coverage
7978
if: matrix.resolver == 'snapshot'
8079
run: carton exec prove -lr --jobs 2 t
8180
env:
8281
HARNESS_PERL_SWITCHES: -MDevel::Cover=+ignore,^t/
83-
- name: Upload coverage reports to Codecov
82+
- name: Generate Codecov report
8483
if: matrix.resolver == 'snapshot'
85-
run: cover -report codecov
86-
env:
87-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
84+
run: cover -report codecovbash
85+
- uses: codecov/codecov-action@v4
86+
if: matrix.resolver == 'snapshot'
87+
with:
88+
fail_ci_if_error: true
89+
file: ./cover_db/codecov.json
90+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)