-
Notifications
You must be signed in to change notification settings - Fork 0
109 lines (87 loc) · 3.16 KB
/
test.yml
File metadata and controls
109 lines (87 loc) · 3.16 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
name: tests
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allow manual triggering from the Actions tab.
workflow_dispatch:
# Cancel any in-flight run for the same ref when a new push lands.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
# macOS only: the package wraps CoreWLAN through pyobjc and the
# SCDynamicStore framework; both unavailable on Linux runners.
# The unit tests do not actually call CoreWLAN (subprocess.run is
# mocked), but pyobjc still has to install — that needs a Mac.
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Sync dev dependencies
run: uv sync --all-groups --python ${{ matrix.python-version }}
- name: Run pytest
run: uv run --python ${{ matrix.python-version }} pytest
regression:
# Synthetic-backend TUI regression. Pinned to one Python version
# because Textual snapshot output is identical across 3.11+ —
# running on three Pythons would just triple cost without
# adding signal. Failures here mean a panel / modal / footer
# rendered something unexpected against deterministic input.
runs-on: macos-latest
needs: pytest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Set up Python 3.11
run: uv python install 3.11
- name: Sync dev dependencies
run: uv sync --all-groups --python 3.11
- name: Run TUI regression scenarios
run: uv run --python 3.11 python scripts/tui_snapshot.py --mode regression
- name: Upload snapshot artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: snapshot-output
path: snapshot-output/
retention-days: 7
spec-validation:
# OpenSpec --strict validation. The spec format is plain Markdown;
# we lean on the published @fission-ai/openspec CLI to confirm
# every spec under openspec/specs/ has a SHALL/MUST first-line
# body, scenarios, and the Purpose/Requirements section
# structure. Cheap to run, blocks merges that introduce
# ill-formed spec edits.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node 22
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install openspec CLI
run: npm install -g @fission-ai/openspec@^1
- name: Validate all specs
run: openspec validate --specs --strict
- name: Validate active changes (if any)
run: |
if [ -n "$(ls openspec/changes 2>/dev/null | grep -v '^archive$' || true)" ]; then
openspec validate --changes --strict
else
echo "No active changes to validate."
fi