Skip to content

CI: switch npm install to npm ci for reproducible builds #487

Closed

Description

@Abfa41

Summary

The validate workflow in .github/workflows/ci.yml currently installs dependencies with npm install. This resolves versions from the live registry on every run, which can silently drift from package-lock.json and produce non-reproducible builds.

Switch to npm ci, which:

  • Installs strictly from package-lock.json.
  • Fails fast if the lockfile is out of sync with package.json.
  • Is faster in CI because it skips dependency resolution.
  • Does not mutate the lockfile.

The workflow already sets cache: 'npm' in actions/setup-node, so npm ci will work with the existing cache configuration.

Scope

CI configuration only. One line in .github/workflows/ci.yml:

Change run: npm install to run: npm ci in the "Install dependencies"
step.

No application code, dependency versions, or lockfile changes are required. This assumes package-lock.json is committed and in sync with package.json (a separate lockfile-sync fix may be a prerequisite).

Verification

  • package-lock.json is present and committed in the repo.
  • npm ci succeeds locally on the current lockfile.
  • The validate job passes identically after the change (same Node 22,
    same npm cache).

Notes

  • The "Run Biome Check" step may still report pre-existing formatting diagnostics across src/; that is unrelated to this change.

Activity

  1. github-actions commented on Nov 15, 2026

    @github-actions

    Discussions are carried on Discord.

    Instead of commenting here, go to the Discord channel.

    If you find this project useful, a GitHub star would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions