Skip to content

Commit a5c46e0

Browse files
authored
ci: Upload coverage for private tests, use OIDC (#6594)
1 parent 9838589 commit a5c46e0

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/api-pull-request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: API Pull Request
22

3+
permissions:
4+
contents: read # For actions/checkout
5+
id-token: write # For Codecov OIDC
6+
37
on:
48
pull_request:
59
paths:
@@ -80,5 +84,5 @@ jobs:
8084
env:
8185
PYTHON: ${{ matrix.python-version }}
8286
with:
83-
token: ${{ secrets.CODECOV_TOKEN }}
8487
env_vars: PYTHON
88+
use_oidc: true

.github/workflows/api-tests-with-private-packages.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
name: Run API tests with private package
1+
name: API Pull Request with Private Packages
2+
3+
permissions:
4+
contents: read # For actions/checkout
5+
id-token: write # For Codecov OIDC
26

37
on:
48
pull_request:
@@ -24,7 +28,12 @@ defaults:
2428
jobs:
2529
test:
2630
runs-on: depot-ubuntu-latest-16
27-
name: API Tests
31+
name: API Unit Tests
32+
33+
strategy:
34+
max-parallel: 2
35+
matrix:
36+
python-version: ["3.11", "3.12"]
2837

2938
steps:
3039
- name: Cloning repo
@@ -35,7 +44,7 @@ jobs:
3544

3645
- uses: actions/setup-python@v5
3746
with:
38-
python-version: "3.12"
47+
python-version: ${{ matrix.python-version }}
3948
cache: poetry
4049

4150
- name: Install SAML Dependencies
@@ -55,3 +64,12 @@ jobs:
5564
env:
5665
DOTENV_OVERRIDE_FILE: .env-ci
5766
run: make test
67+
68+
- name: Upload Coverage
69+
uses: codecov/codecov-action@v4
70+
env:
71+
PRIVATE_PACKAGES: "true"
72+
PYTHON: ${{ matrix.python-version }}
73+
with:
74+
env_vars: PRIVATE_PACKAGES,PYTHON
75+
use_oidc: true

0 commit comments

Comments
 (0)