Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add workflow for lockfile checks #892

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

achou11
Copy link
Member

@achou11 achou11 commented Dec 17, 2024

Copies over the workflow we've set up in core. On pull requests, it runs a job for each of the following:

  1. checking that the lockfile version doesn't change. this usually happens if someone uses an incompatible package manager version to manage dependencies, which we want to prevent

  2. highlighting changes in dependencies that the PR introduces, if any, by writing a PR comment with a table

Introducing this will be helpful for avoiding any surprise updates and highlighting intended changes moving forward


Note that this only does a check on the top-level lockfile. Ideally this would also account for the backend's lockfile, but haven't fully figured out how to get that working just yet.

@achou11 achou11 requested a review from ErikSin December 17, 2024 15:55
@achou11 achou11 force-pushed the ac/lockfile-action branch 2 times, most recently from 43e5240 to 0c1942b Compare December 17, 2024 16:39
@gmaclennan
Copy link
Member

Note that this only does a check on the top-level lockfile. Ideally this would also account for the backend's lockfile, but haven't fully figured out how to get that working just yet.

Run the action a second time and pass:

with:
  path: src/backend/package-lock.json

However it needs an update to our lockfile workflow fork to include the comment header when identifying which comment to update (the header contains the path), otherwise it will be overwritten.

@gmaclennan
Copy link
Member

@achou11
Copy link
Member Author

achou11 commented Dec 19, 2024

any ideas for how to go about the lockfile version check on the backend? doesn't accept a path input like the lockfile changes one, unfortunately

did a quick try with just cd-ing into the backend directory before running the version check action but that didn't seem to work. maybe i did something wrong there?

@gmaclennan
Copy link
Member

No not sure. There are probably some things we can do around checking out a subdirectory, or just the package-lock, but I don't think it's worth the effort at this point for this check.

@achou11 achou11 force-pushed the ac/lockfile-action branch from 0c1942b to 7254c97 Compare January 13, 2025 22:37
@achou11 achou11 merged commit 7f4b927 into develop Jan 13, 2025
5 checks passed
@achou11 achou11 deleted the ac/lockfile-action branch January 13, 2025 22:38
@achou11
Copy link
Member Author

achou11 commented Jan 13, 2025

Decided to merge as is and will leave doing checks for the backend as a follow-up

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