Files
dependabot[bot] 2177c189e3 ci: bump pnpm/action-setup (#334)
Bumps the actions group with 1 update in the / directory: [pnpm/action-setup](https://github.com/pnpm/action-setup).


Updates `pnpm/action-setup` from 5 to 6
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/v5...v6)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-10 04:51:48 +01:00

156 lines
5.4 KiB
YAML

name: CI
on:
# Every branch, not just main. The pre-commit hook now scopes its checks to
# the files that changed (see .husky/pre-commit), which is only safe because
# the full suite runs here on every push — previously a feature branch got no
# remote verification at all until a PR was opened.
push:
branches: ["**"]
pull_request:
branches: [main]
# Opt every JS-based action into the Node 24 runner. Removes deprecation
# warnings for actions still packaged against Node 20 (e.g. pnpm/action-setup@v4).
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
python:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]" pytest-cov
- run: ruff check .
# Basic-mode type check; settings in [tool.pyright] in pyproject.toml.
- if: matrix.python-version == '3.12'
run: pip install pyright==1.1.414 && pyright engine wp_nodes wp_api
# --cov makes [tool.coverage.report] fail_under in pyproject.toml apply.
- run: >
pytest --ignore=tests/syntax/test_fuzz.py --ignore=tests/syntax/test_perf.py
--cov --cov-report=term-missing:skip-covered
- name: Python syntax tests with coverage
run: >
pytest tests/syntax/
--ignore=tests/syntax/test_fuzz.py
--ignore=tests/syntax/test_perf.py
-v --cov=engine/syntax --cov-fail-under=80
- name: Determinism + parity gate
run: pytest tests/syntax/test_determinism.py -v
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm lint
- run: pnpm check:css-isolation
- run: pnpm test:coverage
- name: TS syntax tests (parity + snapshot)
run: pnpm vitest run src/manager/__tests__/syntax/
- run: pnpm build:extension
- run: pnpm size
- run: pnpm build:manager
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage
path: coverage/
retention-days: 14
# Every manager screen in every look (and each palette in dark + light) in
# a real browser, against the real /wp/api on a seeded throwaway library:
# boxes that spill, the page scrolling sideways, one-line controls that
# wrap, checkboxes drawing their state twice or wrongly, corners or fonts
# a look doesn't allow, text under 3:1. See scripts/theme-audit/audit.mjs.
theme-audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm build:manager
- name: Theme audit
run: |
python scripts/theme-audit/serve.py --port 8199 > theme-audit-server.log 2>&1 &
for i in $(seq 1 60); do curl -sf http://127.0.0.1:8199/wp/ > /dev/null && break; sleep 1; done
node scripts/theme-audit/audit.mjs --out theme-audit-out --shots
- if: failure()
uses: actions/upload-artifact@v7
with:
name: theme-audit
path: |
theme-audit-out/
theme-audit-server.log
retention-days: 14
# Perf regression — single-CPU pin for variance reduction
# Non-blocking until budgets are recalibrated against real-world Linux runner
# numbers. Pure-Python single-pass tokenize/resolve is ~1-3M chars/sec; the
# spec's 250ms/500ms targets assumed C-extension-class perf which we do not
# have. Treat as advisory benchmark for now.
perf:
name: Perf gate (advisory)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- name: Perf regression (single-CPU pin)
run: |
if command -v taskset >/dev/null 2>&1; then
taskset -c 0 pytest tests/syntax/test_perf.py -m perf -v --strict-markers
else
pytest tests/syntax/test_perf.py -m perf -v --strict-markers
fi
# Fuzz — opt-in, non-blocking (failures are advisory)
fuzz:
name: Fuzz (non-blocking)
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: pip install -e ".[dev]"
- name: Python fuzz
run: pytest tests/syntax/test_fuzz.py -m fuzz -v --strict-markers
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v7
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: TS fuzz
run: pnpm vitest run src/manager/__tests__/syntax/fuzz.test.ts