Skip to content

Conversation

@cpcallen
Copy link
Collaborator

@cpcallen cpcallen commented Jul 5, 2024

The basics

The details

Proposed Changes

Have the GitHub build workflow, which runs our tests, use npm ci instead of npm install when installing dependencies.

Reason for Changes

This should help ensure that CI catches PRs that update package.json without updating package-lock.json to match.

Additional Information

Proposed in response to breakage caused by PR #8209.

@cpcallen cpcallen requested a review from a team as a code owner July 5, 2024 14:17
@cpcallen cpcallen requested a review from gonfunko July 5, 2024 14:17
@cpcallen
Copy link
Collaborator Author

cpcallen commented Jul 5, 2024

OK the build workflow failed as desired at commit e01154c (upon which I created this branch) since package-lock.json is indeed mismatched against package.json at this point. Going to rebase this on the parent commit (which is not broken) to verify it passes there.

@cpcallen
Copy link
Collaborator Author

cpcallen commented Jul 5, 2024

OK, rebasing this onto a known-good commit did not cause tests to start passing, because it turns out that the checkout workflow checks out a commit that's a merge commit merging the PR into develop, not the tip-of-PR-branch commit. TIL.

Not sure when that changed but obviously it's a lot better because it tells you if your PR will break develop when committed, not just whether it passes tests in isloation.

@cpcallen cpcallen added component: tests PR: chore General chores (dependencies, typos, etc) labels Jul 5, 2024
This should help ensure that CI catches PRs that update
package.json without updating package-lock.json to match.

Proposed in response to breakage caused by PR RaspberryPiFoundation#8209.
@cpcallen cpcallen merged commit be87eb7 into RaspberryPiFoundation:develop Jul 9, 2024
@cpcallen cpcallen deleted the test/npm-ci branch July 11, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: tests PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants