Repository navigation
99 lines (99 loc) · 3.24 KB
/
Copy pathcheck.yaml
File metadata and controls
99 lines (99 loc) · 3.24 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
name: 🧪 check
on:
workflow_dispatch:
push:
branches: ["main"]
tags-ignore: ["**"]
pull_request:
types: [opened, synchronize, reopened]
schedule:
- cron: "0 8 * * *"
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
name: 🧪 Test
runs-on: ubuntu-26.04
strategy:
fail-fast: false
matrix:
env:
- "3.15"
- "3.15t"
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- type-3.9
- type-3.15
- dev
- pkg_meta
steps:
- name: 📥 Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: 🐍 Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: latest-known
python-version: "3.15"
enable-cache: false
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 📦 Install tox
run: uv tool install --python-preference only-managed --python 3.15 tox --with tox-uv
- name: 🐍 Install Python
if: startsWith(matrix.env, '3.') && matrix.env != '3.15'
run: uv python install --python-preference only-managed ${{ matrix.env }}
- name: 📦 Set up test suite
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.env }}
- name: 🧪 Run test suite
run: tox run --skip-pkg-install -e ${{ matrix.env }}
env:
PYTEST_ADDOPTS: "-vv --durations=20"
DIFF_AGAINST: HEAD
old-target:
name: 🧪 Test on old target
runs-on: ubuntu-26.04
steps:
- name: 📥 Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: 🐍 Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
version: latest-known
python-version: "3.15"
enable-cache: false
cache-dependency-glob: "pyproject.toml"
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 🏗️ Build the wheel
run: uv build --wheel --out-dir dist .
- parallel:
- name: 🧪 Discover Python 3.6
run: tasks/old_target_check.sh 3.6 discover
- name: 🧪 Discover Python 3.7
run: tasks/old_target_check.sh 3.7 discover
- name: 🧪 Reject Python 3.5
run: tasks/old_target_check.sh 3.5 rejected
- name: 🧪 Reject Python 2.7
run: tasks/old_target_check.sh 2.7 rejected
gate:
name: 🚦 ${{ github.event_name == 'pull_request' && 'Required checks pass' || 'Non-PR checks pass' }}
if: ${{ !cancelled() }} # codespell:ignore cancelled
needs: [test, old-target]
runs-on: ubuntu-26.04
steps:
- name: 🚦 Require all needed jobs to pass
env:
NEEDS_JSON: ${{ toJSON(needs) }}
run: jq -e 'all(to_entries[]; .value.result == "success")' <<<"$NEEDS_JSON"