Skip to content

Commit 8c5f89b

Browse files
authored
Try migrating to codecov action
1 parent 03ed621 commit 8c5f89b

2 files changed

Lines changed: 26 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: CI
22

33
on: [push, pull_request]
44

5+
permissions:
6+
id-token: write
7+
58
jobs:
69
Windows:
710
name: 'Windows (${{ matrix.python }})'
@@ -23,9 +26,15 @@ jobs:
2326
- name: Run tests
2427
run: ./ci.sh
2528
shell: bash
26-
env:
27-
# Should match 'name:' up above
28-
JOB_NAME: 'Windows (${{ matrix.python }})'
29+
- if: always()
30+
uses: codecov/codecov-action@v5
31+
with:
32+
name: Windows (${{ matrix.python }})
33+
# multiple flags is marked as an error in codecov UI, but is actually fine
34+
# https://github.com/codecov/feedback/issues/567
35+
flags: Windows,${{ matrix.python }}
36+
fail_ci_if_error: true
37+
use_oidc: true
2938

3039
Ubuntu:
3140
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
@@ -60,8 +69,13 @@ jobs:
6069
run: ./ci.sh
6170
env:
6271
CHECK_FORMATTING: '${{ matrix.check_formatting }}'
63-
# Should match 'name:' up above
64-
JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
72+
- if: always()
73+
uses: codecov/codecov-action@v5
74+
with:
75+
name: Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})
76+
flags: Ubuntu,${{ matrix.python }}
77+
fail_ci_if_error: true
78+
use_oidc: true
6579

6680
macOS:
6781
name: 'macOS (${{ matrix.python }})'
@@ -85,3 +99,10 @@ jobs:
8599
env:
86100
# Should match 'name:' up above
87101
JOB_NAME: 'macOS (${{ matrix.python }})'
102+
- if: always()
103+
uses: codecov/codecov-action@v5
104+
with:
105+
name: macOS (${{ matrix.python }})
106+
flags: macOS,${{ matrix.python }}
107+
fail_ci_if_error: true
108+
use_oidc: true

ci.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,3 @@ fi
131131
echo "::group:: Run Tests"
132132
pytest -W error -ra -v tests --cov --cov-config=.coveragerc
133133
echo "::endgroup::"
134-
135-
echo "::group:: Code Coverage"
136-
bash <(curl -s https://codecov.io/bash)
137-
echo "::endgroup::"

0 commit comments

Comments
 (0)