Skip to content

chore(ci): add baseline test workflow (build + vitest + playwright)#8

Merged
SyniRon merged 1 commit into
mainfrom
chore/baseline-ci-workflow
May 22, 2026
Merged

chore(ci): add baseline test workflow (build + vitest + playwright)#8
SyniRon merged 1 commit into
mainfrom
chore/baseline-ci-workflow

Conversation

@SyniRon
Copy link
Copy Markdown
Owner

@SyniRon SyniRon commented May 22, 2026

Summary

  • Adds .github/workflows/ci.yml running on every PR + push to main: pnpm build (which covers tsc -b + vite build + SDE/services generation), pnpm test (vitest), and the Playwright smoke against pnpm preview
  • Caches the CCP SDE zip across runs so we're not redownloading ~50MB on every PR
  • Patches e2e/playwright.config.ts to fall back to Playwright's bundled Chromium when the synicloud-specific /snap/bin/chromium isn't present

Why now

Surfaced while merging PR #7gh pr checks 7 returned "no checks reported" because the repo had no test workflow. The only configured workflow was Dependabot Updates. PRs were merging on local-pnpm test trust. Once this lands, the open Dependabot bumps (#1 Sentry 10, #3 TS 6, #4 plugin-react 5) become safer to merge.

Design notes

  • Single job, not split. Build, vitest, and Playwright share the same install + cache; splitting would duplicate the ~50MB SDE pipeline. Revisit if total time exceeds ~5 min.
  • pnpm build is the typecheck gate. No separate tsc --noEmit step; the build script's tsc -b covers it.
  • SDE cache key is static (freightdesk-sde-zip-v1). scripts/build-sde.ts already self-invalidates the cached zip after 7 days and re-downloads from CCP. A stale cache entry just triggers one extra download.
  • Playwright config fix is the minimum viable change. Wrapped the existing snap-Chromium path in existsSync(); macOS dev boxes and Actions runners now silently fall through to Playwright's bundled Chromium. No behavior change on synicloud.

Test plan

  • Local: cd web && pnpm test (60/60) — unchanged
  • Local: cd e2e && playwright test --list — config parses, 4 tests enumerated
  • CI on this PR — first real run will confirm the SDE build, the vitest pass, and the Playwright smoke all work in Actions

🤖 Generated with Claude Code

The repo had no test workflow before — only Dependabot Updates was
configured, so PRs merged on local-pnpm-test trust (e.g. PR #7).

Adds `.github/workflows/ci.yml`:
  - pnpm 11 + Node 22 (matches the local dev pin)
  - caches the ~50MB CCP SDE zip between runs (the build:sde script
    already self-invalidates after 7 days, so the static key is safe)
  - runs `pnpm build` (which chains build:sde + build:services + tsc -b
    + vite build — also our typecheck gate), then `pnpm test` (vitest),
    then the Playwright smoke against `pnpm preview`
  - uploads the Playwright report as an artifact on failure

Also patches `e2e/playwright.config.ts` to fall back to Playwright's
bundled Chromium when `/snap/bin/chromium` isn't present. The hardcoded
snap path was synicloud-specific; GitHub Actions runners don't have it.
@SyniRon SyniRon merged commit 1b43c5d into main May 22, 2026
1 check passed
@SyniRon SyniRon deleted the chore/baseline-ci-workflow branch May 22, 2026 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant