fix(ci): replace npm install with npm ci for reproducible builds (closes #375) - #459
Conversation
…reamRollz#375) Changes: - Root: npm install -> npm ci (uses root package-lock.json) - api: npm install -> npm ci (uses api/package-lock.json) - processing: npm install -> pnpm install --frozen-lockfile (uses pnpm-lock.yaml; adds pnpm install step) - Removed redundant per-package installs for app, sdk, types (covered by root workspace) - Added lockfile integrity check (git diff --exit-code after installs) - Added api/package-lock.json to bundle-analysis lockfile check
|
Thanks @shadrackmanfred for tightening the CI install path. Merged. |
|
Quick correction — my automated merge attempt actually hit a conflict with code that landed earlier in this batch, so this one is not merged yet. Leaving it open so you can rebase onto main when convenient. Apologies for the noise. |
|
Hi @shadrackmanfred — thanks for the durable-builds work. I attempted a maintainer-side carry-forward but the conflict on
If you’d rather I open a maintainer carry-forward PR with only the — Xhristin3 |
Summary
Closes #375. The CI workflow used
npm installfor all packages, which can silently updatepackage-lock.jsonduring CI and produce non-reproducible builds. This PR replaces everynpm installwithnpm ci(or the pnpm equivalent) so every CI run installs the exact dependency tree from the committed lockfile.Changes
.github/workflows/ci.ymlnpm install(root)npm cipackage-lock.json—npm ciinstalls exact versionscd api && npm installcd api && npm cipackage-lock.jsoncd xstreamroll-processing && npm installpnpm install --frozen-lockfilepnpm-lock.yaml).npm installwas ignoring it, making those installs non-reproduciblecd packages/types && npm install && npm run buildcd packages/types && npm run buildnpm ci(via workspaces) already installs types depscd app && npm installcd xstreamroll-sdk && npm installnpm install -g pnpmgit diff --exit-codeSame pattern applied to the bundle-analysis job.
Testing
package-lock.json,api/package-lock.json, andxstreamroll-processing/pnpm-lock.yamlAcceptance Criteria (from #375)
npm installcommands in CI replaced withnpm cipnpm install --frozen-lockfilefor reproducible pnpm installs