utils/.github/workflows/palette-drift.yml
Krzysztof kuhy Rudnicki cbcee98d94 Add structural_check: spacing/radius/type/motion drift
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-02 08:18:27 +01:00

39 lines
1.4 KiB
YAML

name: palette drift
# Deliberately NOT path-filtered. Every other workflow here scopes itself to
# one package, which is right for tests but wrong for this check: drift is a
# disagreement *between* packages, so editing design_system alone has to be
# able to fail it. A `paths:` filter would let exactly the edit that causes
# drift be the one that skips the check.
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
palette:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
# Compares tokens.md (prose freeze), web_ui/src/tokens.css,
# design_system tokens.dart and gatelock's LockConfig. Fails on a hex
# that disagrees across stacks, and on a colour token that no stack's
# map accounts for.
- name: One palette across all four token sources
run: python3 unified-design-system/scripts/palette_check.py
- name: Categorical ramp still passes its constraints
run: python3 unified-design-system/scripts/ramp_check.py
# Spacing, radius, type, shadow and motion: palette_check.py parses
# hex only, so these scales were unguarded until structural_check.py.
- name: Structural scales agree across all token sources
run: python3 unified-design-system/scripts/structural_check.py