Repository navigation
112 lines (112 loc) · 3.6 KB
/
Copy pathcheck.yaml
File metadata and controls
112 lines (112 loc) · 3.6 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
name: check
on:
workflow_dispatch:
push:
branches: ["main"]
tags-ignore: ["**"]
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
schedule:
- cron: "0 8 * * *"
concurrency:
group: check-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
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:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
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: Setup 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:
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
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
changelog:
if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'skip news')
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
python-version: "3.15"
enable-cache: false
- run: uvx towncrier check --compare-with "origin/${GITHUB_BASE_REF}"
gate:
name: Required checks pass
if: always()
needs: [test, old-target, changelog]
runs-on: ubuntu-24.04
steps:
- env:
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
jq -e '
all(
to_entries[];
.value.result == "success" or
(.key == "changelog" and .value.result == "skipped")
)
' <<< "$NEEDS_JSON"