Skip to content

Commit 4743f79

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 bce6922 commit 4743f79

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
@@ -77,19 +77,22 @@ jobs:
7777
with:
7878
install: |
7979
Devel::Cover
80-
Devel::Cover::Report::Codecov
8180
Devel::Cover::Report::Codecovbash
8281
sudo: false
8382
- name: Run tests with coverage
8483
if: matrix.resolver == 'snapshot'
8584
run: carton exec prove -lr --jobs 2 t
8685
env:
8786
HARNESS_PERL_SWITCHES: -MDevel::Cover=+ignore,^t/
88-
- name: Upload coverage reports to Codecov
87+
- name: Generate Codecov report
8988
if: matrix.resolver == 'snapshot'
90-
run: cover -report codecov
91-
env:
92-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
89+
run: cover -report codecovbash
90+
- uses: codecov/codecov-action@v4
91+
if: matrix.resolver == 'snapshot'
92+
with:
93+
fail_ci_if_error: true
94+
file: ./cover_db/codecov.json
95+
token: ${{ secrets.CODECOV_TOKEN }}
9396
- name: Install precious
9497
run: ./bin/install-precious /usr/local/bin
9598
- name: Install perlimports

0 commit comments

Comments
 (0)