Skip to content

Commit 57d89de

Browse files
Add GitHub Actions CI for sid-python on Linux, macOS and Windows
Runs the full test suite on each platform using the reusable workflows that official CPython uses, plus a quick job that checks the sid-python additions (version label, clamp, flatten, extras, REPL commands). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 8e31e87 commit 57d89de

1 file changed

Lines changed: 72 additions & 0 deletions

File tree

‎.github/workflows/sid-python.yml‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: sid-python tests
2+
3+
# Build sid-python and run the full test suite on Linux, macOS and Windows
4+
# whenever the sid-python branch changes. The jobs reuse the build recipes
5+
# that official CPython uses for its own CI (the reusable-*.yml files).
6+
7+
on:
8+
workflow_dispatch:
9+
push:
10+
branches:
11+
- 'sid-python'
12+
pull_request:
13+
branches:
14+
- 'sid-python'
15+
16+
permissions:
17+
contents: read
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
21+
cancel-in-progress: true
22+
23+
jobs:
24+
linux:
25+
name: Linux
26+
uses: ./.github/workflows/reusable-ubuntu.yml
27+
with:
28+
os: ubuntu-24.04
29+
30+
macos:
31+
name: macOS
32+
uses: ./.github/workflows/reusable-macos.yml
33+
with:
34+
os: macos-26
35+
36+
windows:
37+
name: Windows
38+
uses: ./.github/workflows/reusable-windows.yml
39+
with:
40+
arch: x64
41+
42+
sid-python-features:
43+
# Quick check that the sid-python additions are present and work,
44+
# so a broken change shows up clearly by name.
45+
name: sid-python features (Linux)
46+
runs-on: ubuntu-24.04
47+
timeout-minutes: 30
48+
steps:
49+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
50+
with:
51+
persist-credentials: false
52+
- name: Build
53+
run: |
54+
./configure --with-pydebug
55+
make -j"$(nproc)"
56+
- name: Check the sid-python additions
57+
run: |
58+
./python -c "
59+
import sys, extras
60+
assert '(sid-python)' in sys.version, sys.version
61+
assert clamp(15, 0, 10) == 10
62+
assert flatten([1, [2, [3]]]) == [1, 2, 3]
63+
assert extras.group_by([1, 2, 3], key=lambda n: n % 2) == {1: [1, 3], 0: [2]}
64+
print('sid-python features OK:', sys.version)
65+
"
66+
- name: Run the sid-python tests
67+
run: |
68+
./python -m test -v test_builtin -m '*clamp*' -m '*flatten*'
69+
./python -m test -v test_extras
70+
./python -m test -v test_pyrepl -m '*history_command*' \
71+
-m '*history_variable*' -m '*help_me*' -m '*FormatHistory*' \
72+
-m '*ReplCommands*'

0 commit comments

Comments
 (0)