Skip to content

Commit f288afd

Browse files
authored
Use codecov github action instead of deprecated bash uploader (#9252)
Fixes #9202.
1 parent 0191563 commit f288afd

File tree

3 files changed

+12
-33
lines changed

3 files changed

+12
-33
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,17 @@ jobs:
165165
if: "matrix.use_coverage"
166166
run: "tox -e ${{ matrix.tox_env }}-coverage"
167167

168-
- name: Upload coverage
169-
if: matrix.use_coverage && github.repository == 'pytest-dev/pytest'
170-
env:
171-
CODECOV_NAME: ${{ matrix.name }}
172-
run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }}
168+
- name: Generate coverage report
169+
if: "matrix.use_coverage"
170+
run: python -m coverage xml
171+
172+
- name: Upload coverage to Codecov
173+
if: "matrix.use_coverage"
174+
uses: codecov/codecov-action@v2
175+
with:
176+
fail_ci_if_error: true
177+
files: ./coverage.xml
178+
verbose: true
173179

174180
deploy:
175181
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pytest'

changelog/9202.improvement.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add github action to upload coverage report to codecov instead of bash uploader.

scripts/upload-coverage.sh

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)