Skip to content

ci: Lint and build the CMS on every push and PR - #32

Merged
ecv merged 4 commits into
mainfrom
ci/build-check
Oct 28, 2026
Merged

ecv merged 4 commits into
mainfrom
ci/build-check

Conversation

@ecv

@ecv ecv commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Dependency upgrades to the blog CMS merge with no install or build check, so a breaking bump to the Strapi tree can only be judged by hand. This adds one workflow that installs, lints and builds the CMS on Node 22 for every push to main and every pull request, and leaves the dependencies as they are on main.

Related to #30

Test plan

Node 26 is tracked in #34, and so are React and router upgrades this build cannot catch (#33).

Dependency upgrades to the Strapi tree merged with no install or build
check, so an incompatible plugin or React version only showed up after
the merge.

Run npm ci, lint and build on every push to main and every pull request.
The build compiles the Strapi admin panel, so it fails on an
incompatible dependency.

Key changes:
- Pin Node 22: better-sqlite3 11.3.0 has no prebuilt binary for Node 24
  and fails to compile there, and engines allows 22
- Pin actions by SHA with version comments, matching cloud-portal
- Limit the token to contents: read
@ecv

ecv commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Details. Workflow: .github/workflows/ci.yml, one job, npm ci, npm run lint, npm run build, permissions: contents: read, actions SHA-pinned with # v7 comments (same pins as cloud-portal). Node 22: no .nvmrc or Strapi Cloud config in the repo, engines is >=20 <=24.x; on Node 24, npm ci fails because better-sqlite3 11.3.0 has no prebuilt binary and does not compile. Local on Node 22.23.4: npm ci ok, npm run lint 0 errors and 2 warnings (scripts/seed.js:203, src/bootstrap.js:282, unused vars), npm run build ok. Failure proof error: "styled" is not exported by styled-components from @strapi/design-system. Also tried: @strapi/plugin-graphql@4 fails the build; @strapi/plugin-users-permissions@5.0.0 passes.

ecv added 2 commits October 28, 2026 11:18
The CMS declared no Node version, so CI could not match what Strapi Cloud
runs. Node 26 is on Strapi's supported list and has the October 2026
security fix, while Node 20 has none.

Key features/changes:
- Add .nvmrc pinning Node 26
- Raise engines to >=22 <=26, the range better-sqlite3 13 supports
- Bump better-sqlite3 from 11.3.0 to 13.0.3, since 11.3.0 has no prebuilt
  binary past Node 22 and fails to compile on 24 and 26
Key features/changes:
- Take the Node version from .nvmrc so CI and local installs agree
- Re-pin setup-node to v7.1.0 and label both pins with exact versions
- Drop the checkout token after checkout, cap the job at 15 minutes and
  cancel superseded runs on the same ref
@ecv ecv changed the title ci: Run lint and build on every push and PR ci: Run lint and build on Node 26 for every push and PR Oct 28, 2026
Node 26 needs a better-sqlite3 major and a Strapi Cloud setting change, so
it moves to its own upgrade. CI pins Node 22, the newest version where the
current dependency tree installs, and package.json and the lockfile stay
as they are on main.
@ecv ecv changed the title ci: Run lint and build on Node 26 for every push and PR ci: Lint and build the CMS on every push and PR Oct 28, 2026
@ecv
ecv marked this pull request as ready for review October 28, 2026 15:22
@ecv
ecv requested a review from scotwells October 28, 2026 15:22
@ecv
ecv enabled auto-merge October 28, 2026 15:22
@polylane

polylane Bot commented Oct 28, 2026

Copy link
Copy Markdown

Warning

Polylane could not verify the production impact of this pull request.

This is a CI-only change: the new workflow runs npm ci, lint, and build on GitHub runners and deploys nothing. The CMS runs on Strapi Cloud with no deploy edge from this repo, and GCP logs for strapi over 24h came back empty.

View the full analysis →

Also considered · 2 refuted
  • Refuted · .nvmrc pin changes the Node runtime that Strapi Cloud builds the CMS on · Runtime is picked from the Strapi Cloud dashboard, and 22 is inside the unchanged engines range, so the pin cannot move the deployed runtime; the repository has no deploy edge and no production node to change.
  • Refuted · New workflow's runs compete with or cancel the production CMS deploy · The changed file runs only install/lint/build, and Strapi Cloud's own build is not a GitHub Actions run in this repo, so the workflow's concurrency group cancels only its own runs.
Analysed against 1 cloud account and 1 repository

View in Polylane Pause assessments

Polylane could not find the cloud resources this repository manages, so this review looked at the entire cloud account. Connect this repository to its resources and the next review will focus on exactly what this code deploys to.

Connect resources

Polylane analysed a4831e2 for production impact. You can ask follow-ups by mentioning @polylane in a comment.

Rate this review: 👍 helpful · 👎 not helpful · 😕 confusing

@ecv
ecv merged commit 4f66eec into main Oct 28, 2026
3 checks passed
@ecv
ecv deleted the ci/build-check branch October 28, 2026 15:32
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