feat: Add engine compatibility check for PRs#1356
Open
Conversation
Contributor
✅ Engine Compatibility
|
Member
Author
|
Note: This flow can be ruesed accross repositories the following way: The caller uses I gave it a try in an external repositorty and it seems to be working correctly: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reusable workflow that runs
npm ci --dry-runagainst boundary Node versions and posts a consolidated PR comment with incompatible packages. Addsblockedlabel on failure with detailed Github Bot comment with the failing packages and their node engines.Approaches evaluated:
npm ci --engine-strict: runtime check only, stops at first failure, misses remaining incompatible packagescheck-engine(npm): only checks running Node against root engines, doesn't inspect dependency treecheck-engine-light(npm): range-vs-range via semver.subset(), but v0.x, only 4 releases, unstablels-engines(npm): range-vs-range capable, but v0.x, 17-month release gap, 7 prod dependenciesSelected approach: single-job nvm loop using
npm ci --dry-run(without--engine-strict). Reports all EBADENGINE warnings as a table in one PR comment. No extra dependencies, no matrix, no artifacts — just shell and tools already on the runner.Note: NVM seems to come bundled in the GitHub action images
PoC of the implementation: d3xter666/test-ci#1
JIRA: CPOUI5FOUNDATION-1225