Skip to content

ci(screenshots): walk Settings as the 5th smoke step #51

ci(screenshots): walk Settings as the 5th smoke step

ci(screenshots): walk Settings as the 5th smoke step #51

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Cancel an in-flight run when a new commit lands on the same branch
# (or PR). We only care about the result of the latest push.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
# vendor/beerjson is a git submodule the validator + Rust
# schema tests + type generator all read from. Without
# `submodules: recursive` the runner gets an empty directory
# and `@werb/validate` throws at module-load time.
with:
submodules: recursive
# Version comes from `packageManager` in root package.json.
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: 20
cache: pnpm
- name: Install workspace
run: pnpm install --frozen-lockfile
# BeerXML parser is a Rust crate compiled to WebAssembly. Build
# it before anything that depends on @werb/desktop's bundle.
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
# taiki-e/install-action ships a maintained Node 24 runtime;
# jetli/wasm-pack-action is pinned to Node 16 and on the
# actions-deprecation track.
- uses: taiki-e/install-action@v2
with:
tool: wasm-pack
- name: Generate types from JSON Schemas
run: pnpm gen:types
# Build the WASM pkg before typecheck/test — recipes.ts imports
# from `crates/werb-beerxml-wasm/pkg/` so the module resolves at
# type-check time. The web build script chains build:wasm too,
# but typecheck doesn't, so do it explicitly here.
- name: Build WASM (werb-beerxml-wasm)
run: pnpm --filter @werb/desktop build:wasm
- name: Lint
run: pnpm lint
- name: Type-check
run: pnpm typecheck
- name: Run tests
run: pnpm test
# Build the web bundle on PRs too — catches regressions in code-
# split chunks, asset references, and Vite plugin behavior that
# only surface during production bundling.
- name: Build web bundle
run: pnpm --filter @werb/desktop build
# UI smoke test: drive a real Chromium through Library → Recipe →
# Brew → Journal, the same path a brewer walks. Catches things
# the unit suite can't: label/destination drift on navigation
# buttons, broken click handlers after refactors, missing
# routes, generated bundles that don't render at all. Runs in
# ~30s after the build is already done.
- name: Install Playwright Chromium
run: pnpm --filter @werb/desktop exec playwright install --with-deps chromium
- name: UI smoke (screenshot capture)
run: pnpm screenshots