-
-
Notifications
You must be signed in to change notification settings - Fork 36
89 lines (78 loc) · 3.12 KB
/
Copy pathpython-compatibility.yml
File metadata and controls
89 lines (78 loc) · 3.12 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
name: "Python Compatibility"
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: '0 4 * * 6'
permissions:
contents: read
# Only pull-request runs may be superseded. Keying every event on the ref (as
# this did) coalesces all of main's pushes into one group, and GitHub cancels a
# *pending* run whenever a newer one joins the group -- `cancel-in-progress:
# false` protects a run that has already started, never one still queued. So a
# commit merged while its predecessor was still running lost its validation
# entirely. Keying non-PR events on the run id gives each one its own group,
# which is what "validate every commit" actually requires.
concurrency:
group: python-compatibility-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
compatibility:
# Named "Python ${{ matrix.python-version }}" until now, which collided
# exactly with the Unit Tests matrix job of the same name: `gh pr checks`
# showed two rows reading `Python 3.10`, one a 13-second import smoke test
# and one a three-minute test run, with nothing to tell them apart.
name: Compat Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
# 3.15 deliberately excluded: ruleset 23497679's required checks
# only cover 3.10-3.14, so it cannot block a merge here either. Its
# replacement is the `compatibility-nightly` job below, which runs
# only on this workflow's existing weekly schedule.
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -e .
- name: Verify package
run: |
python -m compileall -q pcapkit
python -c 'import pcapkit; print(pcapkit.__version__)'
# 3.15 is not in ruleset 23497679's required-checks list, so running it on
# every push/PR was queue contention with no gating signal (it was already
# `continue-on-error`). This job keeps early warning of a 3.15-only
# regression -- import and compileall only, ~14s -- without paying for it on
# every push: it fires solely on the schedule trigger above (line 9).
compatibility-nightly:
name: Compat Python 3.15 (scheduled)
if: ${{ github.event_name == 'schedule' }}
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.15"
allow-prereleases: true
- name: Install package
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -e .
- name: Verify package
run: |
python -m compileall -q pcapkit
python -c 'import pcapkit; print(pcapkit.__version__)'