-
Notifications
You must be signed in to change notification settings - Fork 314
181 lines (149 loc) · 4.82 KB
/
Copy pathtest.yml
File metadata and controls
181 lines (149 loc) · 4.82 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
name: Test
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
permissions: {}
jobs:
test:
name: ${{ matrix.os }} / ${{ matrix.python_version }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [Ubuntu, Windows, macOS]
python_version:
["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.15", "3.13t", "3.14t", "3.15t", "pypy3.9", "pypy3.10", "pypy3.11"]
include:
- os: Ubuntu
python_version: "3.11.0"
- os: Ubuntu
python_version: "3.12.0"
- os: Ubuntu
python_version: "3.13.0"
- os: Ubuntu
python_version: "3.14.0"
exclude:
# Slow, sometimes fails to build in CI (not packaging's fault)
- os: Windows
python_version: "3.13t"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python ${{ matrix.python_version }}
with:
python-version: ${{ matrix.python_version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s tests
env:
NOXFORCEPYTHON: ${{ matrix.python_version }}
musl:
name: Alpine / musl
runs-on: ubuntu-latest
container: alpine:3.23.4@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11
steps:
# Alpine ships a genuinely musl-linked Python, so this exercises the
# musllinux tag detection code paths that glibc runners cannot.
- name: Install system dependencies
run: apk add --no-cache git python3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run tests
run: uv run --python python3 python -m pytest
env:
UV_PYTHON_PREFERENCE: only-system
property-tests:
name: Property tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s property_tests
downstream:
name: Downstream ${{ matrix.project }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- packaging_legacy
- build
- pyproject_metadata
- setuptools
- pip
- dependency_groups
- dep_logic
- twine
- cibuildwheel
- hatchling
- tox
- virtualenv
- pdm
- poetry_core
- pipenv
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
env:
MATRIX_PROJECT: ${{ matrix.project }}
run: pipx run nox -s "downstream(project='$MATRIX_PROJECT')"
pickle:
name: Pickle test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
name: Install Python 3.14
with:
python-version: "3.14"
cache: "pip"
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
name: Setup uv
- name: Run nox
run: pipx run nox -s test_pickle
pass:
name: All pass
if: always()
needs:
- test
- musl
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}