Skip to content

Run the project's checks in GitHub Actions - #4

Merged
BunsDev merged 3 commits into
mainfrom
ci/github-actions
Sep 19, 2026
Merged

BunsDev merged 3 commits into
mainfrom
ci/github-actions

Conversation

@BunsDev

@BunsDev BunsDev commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

The repository had no workflows, so npm test, npm run typecheck, npm run lint, npm run build and npm run e2e only ever ran on someone's laptop. This adds .github/workflows/ci.yml, which runs them on every pull request and on pushes to main.

Two jobs run in parallel:

  • unit, types, lint, build — npm ci, then the four commands in order.
  • end-to-end (Playwright) — npm ci, Chromium, then npm run e2e. No credentials: playwright.config.ts builds the app and serves it with TYPESAFE_API_KEY unset, so the suite routes through the simulator. A failing run uploads its Playwright report as an artifact.

Details worth noting:

  • Node is set in the workflow only. The manifest pins neither Node nor a package manager, and this change does not add a pin; Next 16 requires >= 20.9 and CI uses the version the project is developed against.
  • Chromium is cached on the package-lock.json hash, so the cache rebuilds when Playwright's version moves.
  • concurrency cancels a superseded run on the same branch, and permissions is contents: read.
  • CONTRIBUTING.md now says what CI runs, keeping it in step with the check list it already documents.

Test plan

  • Workflow parses as YAML; both jobs and all steps resolve
  • Locally, on this branch: npm test (76), npm run e2e (17), npm run typecheck, npm run lint, npm run build
  • The real check: this pull request's own CI run, which exercises the workflow end to end

Note for whoever merges: pushing workflow files needs a token with the workflow scope. The active gh login has only gist, read:org, repo, so this branch was pushed over SSH.

🤖 Generated with Claude Code

BunsDev and others added 2 commits September 18, 2026 21:42
Nothing was running the suites automatically. `.github/workflows/ci.yml` runs
them on every pull request and on main, in two parallel jobs: unit tests,
types, lint and build in one; the Playwright suite in the other.

The end-to-end job needs no credentials, because playwright.config.ts serves
the app with TYPESAFE_API_KEY unset and the suite routes through the
simulator. Chromium is cached on the lockfile hash, and a failing run uploads
its report as an artifact. Node is pinned in the workflow only: the manifest
pins neither Node nor a package manager, and this does not change that.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Introduce a committed `.env.1password` file that stores an `op://` reference for `TYPESAFE_API_KEY` (not the secret itself), allow it in `.gitignore`, and add `dev:op`/`start:op` scripts to run Next.js through `op run`. Update README with setup, verification (`/api/route` live status), and precedence details explaining why shell-injected values from `op run` override stale `.env.local` values.
Copilot AI lite review requested due to automatic review settings September 19, 2026 02:43
@vercel

vercel Bot commented Sep 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
typesafe-router Ready Ready Preview Sep 19, 2026 2:46am UTC

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Fix the ineffective Playwright report upload and clarify the scope of the 1Password changes.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds GitHub Actions CI for project checks and Playwright E2E tests, plus optional 1Password-backed development scripts.

Changes:

  • Adds parallel unit/type/lint/build and E2E workflow jobs.
  • Documents CI coverage and 1Password usage.
  • Adds .env.1password reference support.
File Summary
README.md Documents 1Password-backed development.
package.json Adds 1Password development scripts; scope should be clarified.
CONTRIBUTING.md Documents CI coverage.
.gitignore Allows the reference environment file.
.github/​workflows/​ci.yml Defines CI jobs; the Playwright report upload will not find a report with the current reporter configuration.
.env.1password Provides the committed 1Password reference.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/ci.yml
Comment on lines +77 to +82
- name: Upload report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report/
The first run warned that actions/checkout, setup-node and cache at v4 target
Node 20, which runners are forcing onto Node 24 ahead of dropping it. Bump to
the current majors: checkout and setup-node v7, cache v6, upload-artifact v7.
Inputs are unchanged, and this run is the check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@BunsDev
BunsDev merged commit 9d62607 into main Sep 19, 2026
3 checks passed
@BunsDev
BunsDev deleted the ci/github-actions branch September 19, 2026 02:57

This branch was successfully deployed

1 active deployment
Preview — 4a67963c Deployed Sep 19, 2026 by vercel[bot]
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.

2 participants