Add CI: oxlint, oxfmt, Playwright E2E + GitHub Actions#9
Conversation
Sets up PR quality gates for the project: - oxlint (.oxlintrc.json) — fast Rust linter over src/tests - oxfmt (.oxfmtrc.json) — Rust formatter; normalizes JS/TS/CSS/MD (skips .astro, which oxfmt does not support yet) - Playwright E2E (playwright.config.ts + tests/e2e) — smoke tests for the fully client-side demo flow (load, spin → verdict, spare) - .github/workflows/ci.yml — runs lint + format:check + build + e2e on every pull request (Vercel still handles build & deploy on push) - npm scripts: lint, format, format:check, test - Rewrote a ternary-as-statement in roulette.astro to satisfy oxlint - gitignore Playwright artifacts; document the workflow in CONTRIBUTING Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThis pull request establishes comprehensive code quality and E2E testing infrastructure. It introduces oxlint and oxfmt configuration, adds npm scripts for linting and formatting, sets up a GitHub Actions CI workflow to enforce these checks on pull requests, creates Playwright E2E testing configuration and test coverage for key user flows, updates developer documentation, and applies the new formatting standards to existing source files. ChangesCode Quality and Testing Infrastructure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds automated quality gates (lint/format/build/E2E) to ensure pull requests are validated consistently before merge, alongside a small code tweak to satisfy the new linter and a formatting-only CSS normalization.
Changes:
- Add Playwright E2E smoke coverage for the hub page and demo roulette flow.
- Add oxlint/oxfmt scripts + configs and wire them into a new GitHub Actions CI workflow.
- Apply formatting and a small control-flow refactor to comply with the new tooling.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Adds PR-only CI job running lint, format check, build, and Playwright E2E with artifact upload. |
.gitignore |
Ignores Playwright reports/results and related cache artifacts. |
.oxfmtrc.json |
Configures oxfmt and ignores unsupported/undesired paths (incl. lockfile). |
.oxlintrc.json |
Configures oxlint severity categories and ignored paths. |
CONTRIBUTING.md |
Documents the new local/CI lint/format/test expectations. |
package-lock.json |
Locks new tooling/test dependencies (Playwright, oxlint, oxfmt). |
package.json |
Adds lint, format, format:check, and test scripts and new devDependencies. |
playwright.config.ts |
Introduces Playwright configuration targeting the Astro dev server. |
src/lib/daily.ts |
Formatting-only changes (type/function signature wrapping). |
src/pages/roulette.astro |
Replaces a ternary-as-statement with an if/else to satisfy oxlint. |
src/styles/global.css |
Formatting-only normalization of existing CSS rules. |
tests/e2e/demo-roulette.spec.ts |
Adds demo roulette E2E tests for chamber load, spin verdict, and sparing behavior. |
tests/e2e/home.spec.ts |
Adds hub page E2E tests for logged-out UI and demo link navigation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| ], | ||
| webServer: { | ||
| command: "npm run dev", |
| "license": "MIT", | ||
| "type": "module", |
| "@playwright/test": "^1.60.0", | ||
| "@tailwindcss/vite": "^4.3.0", | ||
| "oxfmt": "^0.53.0", | ||
| "oxlint": "^1.68.0", | ||
| "playwright": "^1.60.0", | ||
| "tailwindcss": "^4.3.0" |
Sets up automated quality gates that run on every pull request.
What's included
.oxlintrc.json) — fast Rust linter oversrc/tests(npm run lint).oxfmtrc.json) — Rust formatter for JS/TS/CSS/MD (npm run format/format:check). Skips.astro(oxfmt alpha doesn't support it yet).playwright.config.ts+tests/e2e/) — smoke tests for the fully client-side demo flow: hub renders, demo loads with a full chamber, spin → WANTED verdict, sparing pardons a bookmark and shrinks the chamber..github/workflows/ci.yml) — runslint+format:check+build+teston each PR.Notes
pull_requestonly —mainis protected so code lands via PRs (validated here), and Vercel handles build & deploy on push. No redundant post-merge run.src/styles/global.css(formatting only, no visual change — build + E2E green).roulette.astroto satisfy oxlint'sno-unused-expressions.After merge, the
cicheck will be marked as a required status check onmain.🤖 Generated with Claude Code
Summary by CodeRabbit
Tests
Chores