Repository navigation
147 lines (139 loc) · 5.08 KB
/
Copy pathtest.yml
File metadata and controls
147 lines (139 loc) · 5.08 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: test
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 6 * * 1" # weekly: uv.lock pins neither the runner image nor the npx-fetched @playwright/mcp
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
core:
# The install the README promises: openjiuwen alone, no game or report extras, no keys.
# Keep these names in sync with main's required status checks.
name: ${{ matrix.check_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
include:
- os: ubuntu-latest
python: "3.11"
check_name: core (3.11)
- os: ubuntu-latest
python: "3.13"
check_name: core (3.13)
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: ${{ matrix.python }}
enable-cache: true
- run: uv lock --check
- run: uv sync --extra dev
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uv run ty check
- run: uv build
- run: scripts/smoke.sh
shell: bash
- run: uv run pytest -q
core-windows:
# Same core install as `core`, on Windows. Skipped on pull requests to save billed
# Windows minutes; the Linux matrix still covers PRs. Runs on main and the weekly cron.
# Drop the `if` to gate pull requests too. Keep the check name in sync with required status checks.
if: github.event_name != 'pull_request'
name: core (windows, 3.11)
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: "3.11"
enable-cache: true
- run: uv lock --check
- run: uv sync --extra dev
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: uv run ty check
- run: uv build
- run: scripts/smoke.sh
shell: bash
- run: uv run pytest -q
full:
# The contributor install from CONTRIBUTING.md; the ALFWorld tests skip.
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: "3.11"
enable-cache: true
- run: uv sync --extra dev --extra blackjack --extra report
- uses: actions/cache@v6
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ hashFiles('uv.lock') }}
# tests/test_replay.py skips its GIF test when Playwright's Chromium is missing.
- run: uv run playwright install --with-deps chromium
- run: uv run ruff format --check .
- run: uv run ruff check .
- run: scripts/smoke.sh
- run: uv run pytest -q -rs
browser:
# tests/system: the policy probe JS in a headless Chromium through @playwright/mcp. Needs Node and runs without a key.
# Runs on main and the weekly cron until it has a track record. Drop the `if` to gate pull requests too.
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: "3.11"
enable-cache: true
- run: uv sync --extra dev
# The Chromium revision that playwright-core inside the runtime's pinned @playwright/mcp expects.
- run: npx -y -p "$(uv run --no-sync python -c 'import s1a.entry; from s1a.config import DEFAULT_PLAYWRIGHT_MCP_ARGS as a; print(a.split()[-1])')" playwright-core install --with-deps chromium
- run: S1A_BROWSER_TESTS=1 uv run pytest -q tests/system
benchmarks:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
JEVBENCH_ROOT: ${{ github.workspace }}/_reference/jevbench
OMNI_BENCH_SOURCE: ${{ github.workspace }}/_reference/omni/benchmarks/bench.py
steps:
- uses: actions/checkout@v7
- uses: actions/checkout@v7
with:
repository: fstandhartinger/jevbench
ref: 7ce310c7262ed49cc85853339a8a42459298e3f3
path: _reference/jevbench
persist-credentials: false
- uses: actions/checkout@v7
with:
repository: ThinkFlowLab/system1-omni
ref: 4b9cccbde841272ff5ace6aee3cf51610fe1324f
path: _reference/omni
persist-credentials: false
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: "3.11"
enable-cache: true
- run: uv sync --extra dev
- name: Required benchmark tests
run: |
uv run pytest tests/benchmarks -q --junitxml="${RUNNER_TEMP}/benchmark-tests.xml"
uv run python - <<'PY'
import os
import xml.etree.ElementTree as ET
from pathlib import Path
report = Path(os.environ["RUNNER_TEMP"]) / "benchmark-tests.xml"
raise SystemExit(bool(ET.parse(report).findall(".//skipped")))
PY