Skip to content

Commit

Permalink
Remove workaround for codecov coverage uploads (#247)
Browse files Browse the repository at this point in the history
This approach was used in order to fix flaky coverage uploads.
With the release of
[codecov-action@v5](#241),
the workaround does not seem to be necessary.
  • Loading branch information
kdarkhan authored Jan 28, 2025
1 parent 886f15e commit e140941
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 145 deletions.
111 changes: 0 additions & 111 deletions .github/workflows/coverage-report.yml

This file was deleted.

37 changes: 3 additions & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,10 @@ jobs:
- name: Run tests with Coverage report enabled
run: cargo llvm-cov test --all-features --workspace --codecov --locked --output-path codecov_report.json

- name: Store PR number and commit SHA
run: |
echo "Storing PR number ${{ github.event.number }}"
echo "${{ github.event.number }}" > pr_number.txt
echo "Storing commit SHA ${{ github.event.pull_request.head.sha }}"
echo "${{ github.event.pull_request.head.sha }}" > commit_sha.txt
# Workaround for https://github.com/orgs/community/discussions/25220
# Triggered sub-workflow is not able to detect the original commit/PR which is available
# in this workflow.
- name: Store PR number
uses: actions/upload-artifact@v4
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v5
with:
name: pr_number
path: pr_number.txt

- name: Store commit SHA
uses: actions/upload-artifact@v4
with:
name: commit_sha
path: commit_sha.txt

# This stores the coverage report in artifacts. The actual upload to Codecov
# is executed by a different workflow `coverage-report.yml`. The reason for this
# split is because `on.pull_request` workflows don't have access to secrets.
- name: Store coverage report in artifacts
uses: actions/upload-artifact@v4
with:
name: codecov_report
path: codecov_report.json

- run: |
echo "The coverage report was stored in Github artifacts."
echo "It will be uploaded to Codecov using [coverage-report.yml] workflow shortly."
files: ./codecov_report.json

test-other-books:
strategy:
Expand Down

0 comments on commit e140941

Please sign in to comment.