Skip to content

chore: tighten CI and document pnpm-only install#80

Merged
joengy merged 2 commits into
mainfrom
chore/ci-tooling-cleanup
May 20, 2026
Merged

chore: tighten CI and document pnpm-only install#80
joengy merged 2 commits into
mainfrom
chore/ci-tooling-cleanup

Conversation

@joengy
Copy link
Copy Markdown
Collaborator

@joengy joengy commented May 18, 2026

Summary

  • CI: fix boolean precedence in the notification workflow. notification.yml had A && B || C where A && (B || C) was intended. In practice the top-level on: pull_request trigger saved us, so this isn't user-visible — but the logic was wrong.
  • gitignore: block npm/yarn lockfiles repo-wide. This repo is a pnpm workspace (pnpm-workspace.yaml + root pnpm-lock.yaml). A recent feature branch accidentally committed a web/package-lock.json from a stray npm install. The gitignore now ignores package-lock.json and yarn.lock anywhere in the tree, so it can't happen by accident again.
  • README: recommend pnpm install at the root instead of cd web && pnpm install && cd ../cms && pnpm install. In a pnpm workspace, one root install handles both packages — shorter, harder to typo into npm install, and matches how pnpm workspaces are designed to be used. Added a one-line note that npm/yarn aren't supported.

What got dropped from this PR

Initially also added a pnpm --filter cms test:int step to the CMS job. CI surfaced that the integration test can't actually run on GitHub-hosted runners: getPayload() opens a Postgres connection and DATABASE_URL resolves to an IPv6-only host, which GH runners can't reach (ENETUNREACH). The CMS build step never noticed because next build doesn't actually open a DB connection at build time. Reverting that step here — proper fix is wiring up a Postgres service container in CI, which belongs in its own PR.

Test plan

  • CI runs and passes on this PR.
  • Open / reopen / close a PR after merge and confirm the Discord notification still fires correctly.
  • After merge, git ls-files '**/package-lock.json' returns nothing (sanity check that no stray lockfiles slipped in).
  • Run pnpm install at the repo root on a fresh clone and confirm both web/ and cms/ install cleanly.

Notes

  • This does not clean up the existing web/package-lock.json on feature branches that already committed it — those branches still need a git rm web/package-lock.json from their authors (flagged on feature/sponsor-page01 #75).
  • Did not add an only-allow pnpm preinstall guard. Discussed offline — for our team size, the .gitignore rule is enough and the tech lead can catch the rare npm install mistake during review or direct support.

🤖 Generated with Claude Code

joengy added 2 commits May 19, 2026 00:28
- ci: run cms integration tests (vitest) alongside the build, so the
  existing test:int suite actually guards main
- ci: fix boolean precedence in the pull-request-opened notification
  job so the `reopened` clause is scoped to pull_request events
- gitignore: block npm/yarn lockfiles repo-wide; only pnpm-lock.yaml at
  the root is committed
- readme: recommend a single `pnpm install` at the workspace root
  instead of installing per-package, and note that npm/yarn are
  unsupported
The integration test calls getPayload() which opens a Postgres
connection. The repo's DATABASE_URL points to an IPv6-only host,
which GitHub-hosted runners can't reach (ENETUNREACH). The CMS
build step never noticed because next build doesn't actually
open a DB connection at build time.
Copy link
Copy Markdown
Contributor

@deb-coder-man deb-coder-man left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Contributor

@henryhlly henryhlly left a comment

Choose a reason for hiding this comment

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

lgtm

@joengy joengy merged commit a79ead3 into main May 20, 2026
3 checks passed
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.

3 participants