-
-
Notifications
You must be signed in to change notification settings - Fork 5
161 lines (152 loc) · 4.58 KB
/
Copy pathtests.yaml
File metadata and controls
161 lines (152 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
---
name: tests
on:
push:
branches:
- main
- '*.*.*'
pull_request:
branches:
- main
- '*.*.*'
env:
UV_LOCKED: 1
UV_PYTHON_PREFERENCE: only-managed
permissions:
contents: read
jobs:
tests:
name: py${{ matrix.python }} unit tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python:
- '3.14'
- '3.13'
- '3.12'
- '3.11'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "0.12.13"
python-version: ${{ matrix.python }}
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras
- name: Run tests
run: uv run pytest --showlocals
coverage:
name: coverage
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "0.12.13"
python-version: "3.14"
enable-cache: true
- name: Install dependencies
run: uv sync --all-extras
- name: Run tests
run: uv run pytest --cov --cov-fail-under=100
downstream-tests:
name: py${{ matrix.python }} ${{ matrix.downstream }} downstream unit tests
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python:
- '3.14'
- '3.13'
- '3.12'
- '3.11'
downstream:
- scim2-cli
steps:
- name: Checkout upstream pyproject
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "0.12.13"
python-version: ${{ matrix.python }}
enable-cache: true
- name: Checkout downstream pyproject
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: python-scim/${{ matrix.downstream }}
path: ${{ matrix.downstream }}
persist-credentials: false
- name: Install downstream test environment
run: |
cd ${{ matrix.downstream }}
uv sync --all-extras
uv pip install --upgrade --force-reinstall ..
- name: Run downstream tests
run: |
cd ${{ matrix.downstream }}
uv run --no-sync pytest --showlocals
minversions:
name: minimum dependency versions
runs-on: ubuntu-24.04
env:
UV_RESOLUTION: lowest-direct
UV_LOCKED: 0
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "0.12.13"
python-version: "3.11"
enable-cache: true
- name: Install minimum dependencies
run: uv sync --all-extras
- name: Run tests
run: uv run pytest --showlocals
style:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
doc:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
with:
version: "0.12.13"
python-version: "3.14"
enable-cache: true
- name: Install dependencies
run: uv sync --group doc --all-extras
- run: uv run sphinx-build -W --keep-going doc build/sphinx/html
all-checks:
if: always()
needs: [tests, coverage, minversions, style, doc]
runs-on: ubuntu-24.04
steps:
- name: Fail if a needed job did not succeed
if: >-
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
run: exit 1