Skip to content

Commit 8715f9b

Browse files
committed
chore: add coverage and dowstream tests to GHA
1 parent a9782f8 commit 8715f9b

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/tests.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,58 @@ jobs:
3535
- name: Run tests
3636
run: uv run pytest --showlocals
3737

38+
coverage:
39+
name: py${{ matrix.python }} unit tests
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Install uv
44+
uses: astral-sh/setup-uv@v3
45+
with:
46+
enable-cache: true
47+
- name: Install Python ${{ matrix.python }}
48+
run: uv python install ${{ matrix.python }}
49+
- name: Run tests
50+
run: uv run pytest --cov --cov-fail-under=100
51+
52+
downstream-tests:
53+
name: py${{ matrix.python }} ${{ matrix.downstream }} downstream unit tests
54+
runs-on: ubuntu-latest
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
python:
59+
- '3.13'
60+
- '3.12'
61+
- '3.11'
62+
downstream:
63+
- scim2-cli
64+
steps:
65+
- name: Checkout upstream pyproject
66+
uses: actions/checkout@v4
67+
- name: Install uv
68+
uses: astral-sh/setup-uv@v3
69+
with:
70+
enable-cache: true
71+
- name: Checkout downstream pyproject
72+
uses: actions/checkout@v4
73+
with:
74+
repository: python-scim/${{ matrix.downstream }}
75+
path: ${{ matrix.downstream }}
76+
- name: Install Python ${{ matrix.python }}
77+
run: |
78+
cd ${{ matrix.downstream }}
79+
uv python install ${{ matrix.python }}
80+
- name: Install downstream test environment
81+
run: |
82+
cd ${{ matrix.downstream }}
83+
uv sync --all-extras
84+
uv pip install --upgrade --force-reinstall ..
85+
- name: Run downstream tests
86+
run: |
87+
cd ${{ matrix.downstream }}
88+
uv run pytest --showlocals
89+
3890
minversions:
3991
name: minimum dependency versions
4092
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)