Skip to content

Commit 700d892

Browse files
authored
ci: Add engine compatibility check for PRs (external package) (#1036)
JIRA: CPOUI5FOUNDATION-1225 `check-engine-light` is run as a regular CI step. If all dependencies are compatible it exits silently, and if any are incompatible it exits with code 1, failing the build.
1 parent 051b7f3 commit 700d892

3 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ jobs:
2222
node-version: 20.11.0
2323

2424
- name: Install dependencies
25-
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
25+
run: npm ci
26+
27+
- name: Check Node.js engine compatibility
28+
run: npm run check-engine
2629

2730
- name: Perform ESLint check
2831
run: npm run lint

npm-shrinkwrap.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"build": "npm run clean-lib && tsc -p tsconfig.build.json",
3232
"build-test": "tsc --noEmit -p .",
3333
"build-watch": "npm run clean-lib && tsc -w -p tsconfig.build.json",
34+
"check-engine": "check-engine-light -f npm-shrinkwrap.json .",
3435
"check-licenses": "licensee --errors-only",
3536
"clean-coverage": "rimraf coverage",
3637
"clean-lib": "rimraf lib",
@@ -111,6 +112,7 @@
111112
"@ui5-language-assistant/semantic-model-types": "^3.3.1",
112113
"@ui5/cli": "^4.0.51",
113114
"ava": "^6.4.1",
115+
"check-engine-light": "0.4.0",
114116
"eslint": "^9.39.4",
115117
"eslint-plugin-ava": "^15.1.0",
116118
"esmock": "^2.7.3",

0 commit comments

Comments
 (0)