Skip to content

Commit 93daba7

Browse files
committed
ci: pin NPM version
see: loopbackio/cicd#6 Signed-off-by: Rifa Achrinza <[email protected]>
1 parent 979e956 commit 93daba7

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
timeout-minutes: 15
2222
strategy:
2323
matrix:
24-
node-version: [10, 12, 14, 16]
24+
node-version: [10, 12, 14, 16, 17]
2525
mongodb-version: [4.4]
2626
fail-fast: false
2727
steps:
@@ -36,8 +36,12 @@ jobs:
3636
mongodb-version: ${{ matrix.mongodb-version }}
3737
- name: Bootstrap project
3838
run: npm ci --ignore-scripts
39+
- name: Update NPM (Node.js v10)
40+
if: matrix.node-version == 10
41+
run: npm install --global npm@7
3942
- name: Update NPM
40-
run: npm install --global npm
43+
if: matrix.node-version != 10
44+
run: npm install --global npm@8
4145
- name: Run tests
4246
run: npm test --ignore-scripts
4347
- name: Publish coverage report to Coveralls
@@ -67,7 +71,7 @@ jobs:
6771
- name: Use Node.js 14
6872
uses: actions/setup-node@v2
6973
with:
70-
node-version: 14
74+
node-version: 16
7175
- name: Bootstrap project
7276
run: npm ci --ignore-scripts
7377
- name: Verify code linting
@@ -83,7 +87,7 @@ jobs:
8387
- name: Use Node.js 14
8488
uses: actions/setup-node@v2
8589
with:
86-
node-version: 14
90+
node-version: 16
8791
- name: Bootstrap project
8892
run: npm ci --ignore-scripts
8993
- name: Verify commit linting

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@ before_install: |
2020
exit 2
2121
fi
2222
done
23+
NODEJS_VERSION=$(node --version)
24+
if [ 'v10' == ${NODEJS_VERSION%%.*} ]
25+
then
26+
npm install --global npm@7
27+
else
28+
npm install --global npm@8
29+
fi
2330
install:
24-
- npm install --global npm
2531
- npm ci --ignore-scripts
2632
script: npm test --ignore-scripts

0 commit comments

Comments
 (0)