diff options
author | Jay Berkenbilt <ejb@ql.org> | 2024-02-18 15:22:27 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2024-02-18 15:22:27 +0100 |
commit | 239ee0069eba2f09018f5762199507cece6c2710 (patch) | |
tree | c50bcf0d4b619734600544cd17c48f12ca91e998 | |
parent | 3ebe8bf6c3aec7e92f3bbfca32e1c9994339e076 (diff) | |
download | qpdf-239ee0069eba2f09018f5762199507cece6c2710.tar.zst |
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.
-rw-r--r-- | .github/workflows/main.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8529b418..87ccd61c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,10 +130,18 @@ jobs: - uses: actions/checkout@v4 - name: 'Code Coverage' run: build-scripts/test-coverage + - id: set_branch + 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 reports to Codecov uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} + override_branch: ${{ steps.set_branch.outputs.override_branch }} QuickJobs: runs-on: ubuntu-latest needs: Prebuild |