Debian Codegraph @

testing/web-platform/tests/tools/third_party/pytest/.github/workflows/test.yml

raw
1 name: test
2
3 on:
4 push:
5 branches:
6 - main
7 - "[0-9]+.[0-9]+.x"
8 - "test-me-*"
9 tags:
10 - "[0-9]+.[0-9]+.[0-9]+"
11 - "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
12
13 pull_request:
14 branches:
15 - main
16 - "[0-9]+.[0-9]+.x"
17
18 env:
19 PYTEST_ADDOPTS: "--color=yes"
20
21 # Cancel running jobs for the same workflow and branch.
22 concurrency:
23 group: ${{ github.workflow }}-${{ github.ref }}
24 cancel-in-progress: true
25
26 # Set permissions at the job level.
27 permissions: {}
28
29 jobs:
30 package:
31 runs-on: ubuntu-latest
32 steps:
33 - uses: actions/checkout@v4
34 with:
35 fetch-depth: 0
36 persist-credentials: false
37 - name: Build and Check Package
38 uses: hynek/[email protected]
39
40 build:
41 needs: [package]
42
43 runs-on: ${{ matrix.os }}
44 timeout-minutes: 45
45 permissions:
46 contents: read
47
48 strategy:
49 fail-fast: false
50 matrix:
51 name: [
52 "windows-py38",
53 "windows-py38-pluggy",
54 "windows-py39",
55 "windows-py310",
56 "windows-py311",
57 "windows-py312",
58 "windows-py313",
59
60 "ubuntu-py38",
61 "ubuntu-py38-pluggy",
62 "ubuntu-py38-freeze",
63 "ubuntu-py39",
64 "ubuntu-py310",
65 "ubuntu-py311",
66 "ubuntu-py312",
67 "ubuntu-py313",
68 "ubuntu-pypy3",
69
70 "macos-py38",
71 "macos-py39",
72 "macos-py310",
73 "macos-py312",
74 "macos-py313",
75
76 "doctesting",
77 "plugins",
78 ]
79
80 include:
81 - name: "windows-py38"
82 python: "3.8"
83 os: windows-latest
84 tox_env: "py38-unittestextras"
85 use_coverage: true
86 - name: "windows-py38-pluggy"
87 python: "3.8"
88 os: windows-latest
89 tox_env: "py38-pluggymain-pylib-xdist"
90 - name: "windows-py39"
91 python: "3.9"
92 os: windows-latest
93 tox_env: "py39-xdist"
94 - name: "windows-py310"
95 python: "3.10"
96 os: windows-latest
97 tox_env: "py310-xdist"
98 - name: "windows-py311"
99 python: "3.11"
100 os: windows-latest
101 tox_env: "py311"
102 - name: "windows-py312"
103 python: "3.12"
104 os: windows-latest
105 tox_env: "py312"
106 - name: "windows-py313"
107 python: "3.13-dev"
108 os: windows-latest
109 tox_env: "py313"
110
111 - name: "ubuntu-py38"
112 python: "3.8"
113 os: ubuntu-latest
114 tox_env: "py38-lsof-numpy-pexpect"
115 use_coverage: true
116 - name: "ubuntu-py38-pluggy"
117 python: "3.8"
118 os: ubuntu-latest
119 tox_env: "py38-pluggymain-pylib-xdist"
120 - name: "ubuntu-py38-freeze"
121 python: "3.8"
122 os: ubuntu-latest
123 tox_env: "py38-freeze"
124 - name: "ubuntu-py39"
125 python: "3.9"
126 os: ubuntu-latest
127 tox_env: "py39-xdist"
128 - name: "ubuntu-py310"
129 python: "3.10"
130 os: ubuntu-latest
131 tox_env: "py310-xdist"
132 - name: "ubuntu-py311"
133 python: "3.11"
134 os: ubuntu-latest
135 tox_env: "py311"
136 use_coverage: true
137 - name: "ubuntu-py312"
138 python: "3.12"
139 os: ubuntu-latest
140 tox_env: "py312"
141 use_coverage: true
142 - name: "ubuntu-py313"
143 python: "3.13-dev"
144 os: ubuntu-latest
145 tox_env: "py313"
146 use_coverage: true
147 - name: "ubuntu-pypy3"
148 python: "pypy-3.8"
149 os: ubuntu-latest
150 tox_env: "pypy3-xdist"
151
152 - name: "macos-py38"
153 python: "3.8"
154 os: macos-latest
155 tox_env: "py38-xdist"
156 - name: "macos-py39"
157 python: "3.9"
158 os: macos-latest
159 tox_env: "py39-xdist"
160 use_coverage: true
161 - name: "macos-py310"
162 python: "3.10"
163 os: macos-latest
164 tox_env: "py310-xdist"
165 - name: "macos-py312"
166 python: "3.12"
167 os: macos-latest
168 tox_env: "py312-xdist"
169 - name: "macos-py313"
170 python: "3.13-dev"
171 os: macos-latest
172 tox_env: "py313-xdist"
173
174 - name: "plugins"
175 python: "3.12"
176 os: ubuntu-latest
177 tox_env: "plugins"
178
179 - name: "doctesting"
180 python: "3.8"
181 os: ubuntu-latest
182 tox_env: "doctesting"
183 use_coverage: true
184
185 steps:
186 - uses: actions/checkout@v4
187 with:
188 fetch-depth: 0
189 persist-credentials: false
190
191 - name: Download Package
192 uses: actions/download-artifact@v4
193 with:
194 name: Packages
195 path: dist
196
197 - name: Set up Python ${{ matrix.python }}
198 uses: actions/setup-python@v5
199 with:
200 python-version: ${{ matrix.python }}
201 check-latest: ${{ endsWith(matrix.python, '-dev') }}
202
203 - name: Install dependencies
204 run: |
205 python -m pip install --upgrade pip
206 pip install tox coverage
207
208 - name: Test without coverage
209 if: "! matrix.use_coverage"
210 shell: bash
211 run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
212
213 - name: Test with coverage
214 if: "matrix.use_coverage"
215 shell: bash
216 run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`
217
218 - name: Generate coverage report
219 if: "matrix.use_coverage"
220 run: python -m coverage xml
221
222 - name: Upload coverage to Codecov
223 if: "matrix.use_coverage"
224 uses: codecov/codecov-action@v4
225 continue-on-error: true
226 with:
227 fail_ci_if_error: true
228 files: ./coverage.xml
229 verbose: true