Skip to content

ci: Only run Check lockfile when package.json or yarn.lock changes#21077

Open
mydea wants to merge 1 commit into
developfrom
ci/check-lockfile-only-on-deps-change
Open

ci: Only run Check lockfile when package.json or yarn.lock changes#21077
mydea wants to merge 1 commit into
developfrom
ci/check-lockfile-only-on-deps-change

Conversation

@mydea
Copy link
Copy Markdown
Member

@mydea mydea commented May 20, 2026

Summary

Gates the job_check_lockfile job in build.yml on whether package.json (any of them) or yarn.lock actually changed. PRs that don't touch dependencies skip it.

How

Adds a deps filter to the existing dorny/paths-filter step in ci-metadata.yml (matching **/package.json + yarn.lock), exposes it as a new changed_deps output, and adds an if: condition to job_check_lockfile:

if: |
  needs.job_get_metadata.outputs.changed_deps == 'true' ||
  needs.job_get_metadata.outputs.is_base_branch == 'true' ||
  needs.job_get_metadata.outputs.is_release == 'true'

Pushes to base branches (develop / v9 / v8) and release branches still run the check unconditionally — same safety pattern as job_build, so the lockfile is always verified end-to-end on those.

On PRs that don't touch any package.json or yarn.lock, the lockfile
check is wasted work — it just re-runs `yarn install --frozen-lockfile`
+ dedupe-deps:check against an unchanged lockfile.

Adds a `deps` dorny/paths-filter entry in ci-metadata.yml (matching
`**/package.json` and `yarn.lock`), exposes it as `changed_deps`, and
gates job_check_lockfile on it. Still runs on base-branch pushes and
release branches so develop / release/* are always verified end-to-end.
@mydea mydea requested review from a team, Lms24 and andreiborza and removed request for a team May 20, 2026 14:42
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