Skip to content

Commit

Permalink
Set PR number and SHA hash in Codecov upload
Browse files Browse the repository at this point in the history
  • Loading branch information
phoerious committed Aug 12, 2024
1 parent 774e33f commit d9f785a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,20 +242,28 @@ jobs:
TOKENLESS: ${{ github.event.pull_request.head.label }}
run: |
set -e
PR=""
if [ -n '${{ github.event.pull_request.head.sha }}' ]; then
PR="--pr ${{ github.event.number }}"
fi
python${PYTHON_VERSION} -m codecov_cli.main do-upload \
--file report.junit.xml \
--report-type test_results \
--sha ${{ github.sha }} \
--sha ${{ github.event.pull_request.head.sha || github.sha }} \
--branch ${{ github.event.pull_request.head.label || github.ref_name }} \
$PR \
--slug ${{ github.repository }} \
--git-service github \
--fail-on-error
python${PYTHON_VERSION} -m codecov_cli.main upload-process \
--file coverage.xml \
--report-type coverage \
--sha ${{ github.sha }} \
--sha ${{ github.event.pull_request.head.sha || github.sha }} \
--branch ${{ github.event.pull_request.head.label || github.ref_name }} \
$PR \
--slug ${{ github.repository }} \
--git-service github \
--fail-on-error
Expand Down

0 comments on commit d9f785a

Please sign in to comment.