Skip to content

Commit

Permalink
Work around codecov issue 1296.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeking3 committed Dec 27, 2024
1 parent b0cdffc commit 1c83e58
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,17 @@ jobs:
if: matrix.coverage
run: ci/codecov.sh "collect"

# https://github.com/codecov/codecov-action/issues/1296
- name: Get branch for coverage
id: coverage_branch
if: matrix.coverage
run: |
if [ "${{ github.event_name }}" = "push" ]; then
echo "override_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
else
echo "override_branch=" >> $GITHUB_OUTPUT
fi
- name: Upload coverage
if: matrix.coverage
uses: codecov/codecov-action@v5
Expand All @@ -235,6 +246,7 @@ jobs:
fail_ci_if_error: true
files: coverage.info
name: Github Actions
override_branch: ${{ steps.coverage_branch.outputs.override_branch }}
token: ${{secrets.CODECOV_TOKEN}}
verbose: true

Expand Down

0 comments on commit 1c83e58

Please sign in to comment.