Skip to content

Commit

Permalink
Add github action for upload coverge to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianMeli committed Oct 30, 2021
1 parent 1824349 commit 643c525
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,15 @@ jobs:
if: "matrix.use_coverage"
run: "tox -e ${{ matrix.tox_env }}-coverage"

- name: Upload coverage
if: matrix.use_coverage && github.repository == 'pytest-dev/pytest'
env:
CODECOV_NAME: ${{ matrix.name }}
run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }}
- name: Generate coverge report
run: python -m coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
files: ./coverage.xml
verbose: true

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

0 comments on commit 643c525

Please sign in to comment.