Repository navigation
ci: Lint and build the CMS on every push and PR - #32
Conversation
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
|
Details. Workflow: |
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
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.
|
Warning Polylane could not verify the production impact of this pull request. This is a CI-only change: the new workflow runs Also considered · 2 refuted
Analysed against 1 cloud account and 1 repository
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. Polylane analysed Rate this review: 👍 helpful · 👎 not helpful · 😕 confusing |
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).