Skip to content

Commit 007b02e

Browse files
authored
ci: Fail-fast "npm ci" if deps require unsupported node version (#488)
When upgrading a dependency to a newer version, it might require a different node version than before which could be unsupported by the repo. Unfortunately, this could be easily overseen. This PR adds the flag --engine-strict to the dependency installation step during the GH Actions job. Incase such a version requirement change, this flag will now fail-fast the job which should attract attention.
1 parent 0a81de0 commit 007b02e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/github-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
node-version: 20.11.0
2626

2727
- name: Install dependencies
28-
run: npm ci
28+
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
2929

3030
- name: Perfrom ESLint check
3131
run: npm run lint

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
node-version: ${{ matrix.version }}
3030

3131
- name: Install dependencies
32-
run: npm ci
32+
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
3333

3434
- name: Run unit tests
3535
run: npm run test:unit:coverage
@@ -57,7 +57,7 @@ jobs:
5757
node-version: 22.x
5858

5959
- name: Install dependencies
60-
run: npm ci
60+
run: npm ci --engine-strict # --engine-strict is used to fail-fast if deps require node versions unsupported by the repo
6161

6262
- name: Install @ui5/cli ${{matrix.ui5-cli}}
6363
run: npm i -D @ui5/cli@${{matrix.ui5-cli}}

0 commit comments

Comments
 (0)