Skip to content

refactor!: rename domain concept layout → deck #120

refactor!: rename domain concept layout → deck

refactor!: rename domain concept layout → deck #120

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Single Python version (not a matrix) — CI runs the declared floor,
# 3.11 (pyproject requires-python >=3.11), so the minimum-supported
# version is the one actually tested. The code uses no version-specific
# features, so testing the floor covers the pinned dev version too.
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "20"
# Match `just setup-linux` (.[dev,uinput,dbus]) so the pyright typecheck
# resolves the daemon's optional-backend imports (dbus_fast, evdev).
# Installing only .[dev] leaves those extras absent and every
# dbus_fast/evdev import reads as reportMissingImports — the CI/local
# drift the [tool.pyright] note in pyproject.toml warns about.
- name: Install Python deps
run: pip install -e ".[dev,uinput,dbus]"
- name: Install client deps
run: npm install
working-directory: client
# Each step is named so a failure points at the subsystem
# (#77 — "failures identify the relevant subsystem and remediation
# rather than only returning a generic nonzero result"). The
# recipe these mirror is `just test-all`; run it locally to
# reproduce a CI failure.
- name: "[1/7] pyright daemon (Python typecheck)"
run: |
pip install pyright
pyright --pythonpath "$(command -v python)" daemon
- name: "[2/7] pytest (Python unit + integration)"
run: pytest
- name: "[3/7] tsc --noEmit (TypeScript typecheck)"
run: npx tsc --noEmit
working-directory: client
- name: "[4/7] vitest unit (client unit tests)"
run: npm run test:unit
working-directory: client
# Build the client before e2e — playwright serves client/dist, so
# any TypeScript change in client/src must be bundled for the
# browser to pick it up.
- name: "[5/7] playwright e2e (client end-to-end)"
run: |
# No nix store on the runner, so find-chromium.mjs returns undefined
# and Playwright falls back to its own managed browser — which must
# be installed first (with system libs). Without this the launch
# fails with "Executable doesn't exist … chrome-headless-shell".
npx playwright install --with-deps chromium
npm run build
npm run test:e2e
working-directory: client
- name: "[6/7] smoke (daemon end-to-end via stable fixture #77)"
run: python -u scripts/smoke.py
- name: "[7/7] eslint (client lint)"
run: npm run lint
working-directory: client
# macOS carries no uinput/evdev, so the full suite (which imports the
# Linux input path) can't run here. But the macOS *backend* is pure —
# platform_macos and the platform-parity drift-guard only read
# advertised capability flags, never PyObjC/Quartz — so run exactly
# those two files on a real Mac. This is what actually exercises the
# macOS column of docs/PLATFORM-PARITY.md from a macOS runner (#136);
# on ubuntu the same assertion passes but on the host's Python only.
#
# The full ladder (lint / tsc / vitest / smoke) is exercised on the
# ubuntu job above. macOS here is host-safe (no input devices, no
# desktop required) per #77 AC "CI covers the macOS platform path
# without requiring physical macOS input devices" — the parity test
# reads advertised capability flags only.
test-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: pip install -e ".[dev]"
- name: "[macOS] platform-parity + macOS backend"
run: pytest -v tests/test_platform_parity.py tests/test_platform_macos.py
# Nix packaging: builds packages.deckd + the focus-watcher bundles,
# evaluates the NixOS/home-manager modules against dummy configs,
# unit-tests the activation scripts in a sandbox, and boots the packaged
# daemon on loopback (health, bundled client, bundled decks). Mirrors
# `just nix-check` locally; see nix/tests/.
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
- name: "[nix] flake check (packages + module evals + smoke)"
run: nix flake check -L
# The Nix package ships Python 3.12 (nixos-unstable's 3.11 package set
# can't build our dependency closure), so test the interpreter users
# actually get on NixOS. The 3.11 floor is covered by the main `test`
# job above; this job is the behavioural half of the 3.12 story.
test-py312:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
# Match the main job's extras so optional-backend imports resolve.
- name: Install Python deps
run: pip install -e ".[dev,uinput,dbus]"
- name: "[py3.12] pytest (Python unit + integration)"
run: pytest
- name: "[py3.12] smoke (daemon end-to-end via stable fixture #77)"
run: python -u scripts/smoke.py