-
Notifications
You must be signed in to change notification settings - Fork 23
128 lines (109 loc) · 3.26 KB
/
Copy pathtests.yml
File metadata and controls
128 lines (109 loc) · 3.26 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
name: tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
pytest:
name: Test Python ${{ matrix.python }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
python:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.15"
include:
- os: macos-15-intel
python: "3.9"
- os: macos-14
python: "3.12"
- os: ubuntu-latest
python: "pypy-3.11"
- os: windows-latest
python: "3.9"
- os: windows-latest
python: "3.11"
- os: windows-latest
python: "3.13"
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up target Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install the latest version of uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Run tests
run: uv run noxfile.py -s test-$PYTHON
shell: bash
env:
PYTHON: ${{ matrix.python }}
- name: Run minimum tests
run: uv run noxfile.py -s minimums-$PYTHON
shell: bash
env:
PYTHON: ${{ matrix.python }}
- name: Send coverage report
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
env:
PYTHON: ${{ matrix.python }}
with:
flags: tests
env_vars: PYTHON
name: ${{ matrix.python }}
downstream:
name: Downstream ${{ matrix.project }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- sphinx-theme-builder
- meson-python
- scikit-build-core
- pdm-backend
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up target Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.14"
- name: Install the latest version of uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
- name: Run nox
run: uvx nox -s "downstream(project=\"$PROJECT\")"
env:
PROJECT: ${{ matrix.project }}
# https://github.com/marketplace/actions/alls-green#why
required-checks-pass: # zizmor: ignore[anonymous-definition] required check; name must stay as the job id
if: always()
needs:
- pytest
- downstream
runs-on: ubuntu-slim
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0
with:
jobs: ${{ toJSON(needs) }}