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 331ccde
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-12 ]
# os: [ ubuntu-latest, windows-latest, macos-12 ]
os: [ ubuntu-latest ]
env:
CIBW_BUILD: "cp312*"
CIBW_SKIP: "*-musllinux*"
CIBW_ARCHS_MACOS: "x86_64 arm64"
CIBW_ARCHS_LINUX: "x86_64"
Expand Down Expand Up @@ -242,20 +244,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 331ccde

Please sign in to comment.