Skip to content

Commit

Permalink
Add selective Codecov submit
Browse files Browse the repository at this point in the history
Only for Linux, only for ready PRs, and only for PRs to `main` or
`stable`.
  • Loading branch information
bskinn committed Jan 6, 2025
1 parent 2c1ae58 commit cfb2674
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/all_core_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,10 @@ jobs:
- name: Run tests & report source coverage
run: |
pytest --cov --testall --nonloc
- name: Submit to Codecov if Linux and ready status
if: ${{ matrix.os == 'ubuntu-latest' && !github.event.pull_request.draft && (github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'stable') }}
run: |
curl -Os https://cli.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage-service.xml

0 comments on commit cfb2674

Please sign in to comment.