Commit 239ee0069eba2f09018f5762199507cece6c2710
1 parent
3ebe8bf6
Try overriding branch name in CodeCov
As of this moment, if a specific commit's coverage data is uploaded to CodeCov via a pull request, when that exact same commit builds in main, the branch is not associated with the commit. I'm hoping this might work around that.
Showing
1 changed file
with
8 additions
and
0 deletions
.github/workflows/main.yml
| ... | ... | @@ -130,10 +130,18 @@ jobs: |
| 130 | 130 | - uses: actions/checkout@v4 |
| 131 | 131 | - name: 'Code Coverage' |
| 132 | 132 | run: build-scripts/test-coverage |
| 133 | + - id: set_branch | |
| 134 | + run: | | |
| 135 | + if [ "${{ github.event_name }}" = "push" ]; then | |
| 136 | + echo "override_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
| 137 | + else | |
| 138 | + echo "override_branch=" >> $GITHUB_OUTPUT | |
| 139 | + fi | |
| 133 | 140 | - name: Upload coverage reports to Codecov |
| 134 | 141 | uses: codecov/codecov-action@v4 |
| 135 | 142 | with: |
| 136 | 143 | token: ${{ secrets.CODECOV_TOKEN }} |
| 144 | + override_branch: ${{ steps.set_branch.outputs.override_branch }} | |
| 137 | 145 | QuickJobs: |
| 138 | 146 | runs-on: ubuntu-latest |
| 139 | 147 | needs: Prebuild | ... | ... |