Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[ci]: separate codecov upload into separate job #4455

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 38 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ jobs:
if: ${{ needs.fuzzing.result != 'success' }}
run: exit 1

consolidate-coverage:
# Consolidate code coverage using `coverage combine` and upload
# to the codecov app
coverage-report:
# Consolidate code coverage using `coverage combine` and
# call coverage report with fail-under=90
runs-on: ubuntu-latest
needs: [tests, fuzzing]

Expand All @@ -261,8 +261,43 @@ jobs:
- name: Combine coverage
run: |
coverage combine coverage-files/**/.coverage

- name: Coverage report
# coverage report and fail if coverage is too low
run: |
coverage report --fail-under=90

- name: Generate coverage.xml
run: |
coverage xml

- name: Upload coverage sqlite artifact
# upload coverage sqlite db for debugging
uses: actions/upload-artifact@v4
with:
name: coverage-sqlite
include-hidden-files: true
path: .coverage
if-no-files-found: error

- name: Upload coverage.xml
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml
if-no-files-found: error

upload-coverage:
# upload coverage to the codecov app
runs-on: ubuntu-latest
needs: [coverage-report]

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: coverage-xml

- name: Upload Coverage
uses: codecov/codecov-action@v5
with:
Expand Down
Loading