Repository navigation
208 lines (196 loc) · 7 KB
/
Copy pathregular.yml
File metadata and controls
208 lines (196 loc) · 7 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: Regular Checks
on:
schedule:
# Run roughly every 15 days at 02:08 UTC
- cron: '8 2 1,16 * *'
workflow_dispatch:
env:
COVERAGE_OVERALL_THRESH: 70 # threshold for overall coverage check
COVERAGE_INDIVIDUAL_THRESH: 45 # threshold for individual coverage check
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
reminder:
runs-on: ubuntu-latest
name: "Reminder"
continue-on-error: true
permissions:
issues: write # Required for reminder-action to post issue comments
steps:
- name: check reminders and notify
uses: agrc/reminder-action@ab1f38534c17a1c16ba96eaf5fb9c0015d509301 # v1
# Warns about broken links in the docs. Especially useful for
# those that point to our own github.io page (linkcheck is disabled in the
# CI pipeline, because the respective pages are yet to be created at that time).
docs:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
with: {python-version: "3.10"}
- name: Build Docs
run: |
pip install tox-uv
tox -e docs-py310 -- -r
lint:
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'},
{semantic: '3.14', tox: 'py314'} ]
name: Lint ${{ matrix.py-version.semantic }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run linting
run: |
pip install tox-uv
tox -e lint-${{ matrix.py-version.tox }}
typecheck:
needs: [lint]
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'},
{semantic: '3.14', tox: 'py314'} ]
name: Type Check ${{ matrix.py-version.semantic }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run type check
run: |
pip install tox-uv
tox -e typecheck-${{ matrix.py-version.tox }}
audit:
needs: [lint]
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'},
{semantic: '3.14', tox: 'py314'} ]
name: Audit ${{ matrix.py-version.semantic }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run pip-audit
run: |
pip install tox-uv
tox -e audit-${{ matrix.py-version.tox }}
coretest:
needs: [typecheck, audit]
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'},
{semantic: '3.14', tox: 'py314'} ]
name: Core Tests ${{ matrix.py-version.semantic }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run core tests
run: |
pip install tox-uv
tox -e coretest-${{ matrix.py-version.tox }}
fulltest:
needs: [typecheck, audit]
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'} ]
name: Full Tests ${{ matrix.py-version.semantic }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run full tests
run: |
pip install tox-uv
tox -e fulltest-${{ matrix.py-version.tox }} -- --cov-report=xml
- name: "Assert Overall Coverage"
run: |
pip install coverage
coverage report --fail-under=${{ env.COVERAGE_OVERALL_THRESH }}
- name: "Assert Individual Coverage"
shell: bash
run: |
coverage report |
grep -E -o '[0-9]+%' |
tr -d '%' |
sed '$d' |
awk '{if ( $1<${{ env.COVERAGE_INDIVIDUAL_THRESH }} ) exit 1 }'
gputest:
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: [typecheck, audit]
strategy:
fail-fast: false
matrix:
py-version: [ {semantic: '3.10', tox: 'py310'},
{semantic: '3.11', tox: 'py311'},
{semantic: '3.12', tox: 'py312'},
{semantic: '3.13', tox: 'py313'},
{semantic: '3.14', tox: 'py314'} ]
name: GPU Tests ${{ matrix.py-version.semantic }}
runs-on: XS-GPU
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v6
id: setup-python
with:
python-version: ${{ matrix.py-version.semantic }}
- name: Run GPU tests
run: |
pip install tox-uv
tox -e gputest-${{ matrix.py-version.tox }}