Skip to content

Commit

Permalink
ci: pin NPM version
Browse files Browse the repository at this point in the history
see: loopbackio/cicd#6

Signed-off-by: Rifa Achrinza <[email protected]>
  • Loading branch information
achrinza authored and apocist committed May 12, 2022
1 parent bdc1f2b commit 2f61960
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
node-version: [10, 12, 14, 16]
node-version: [10, 12, 14, 16, 17]
mongodb-version: [4.4]
fail-fast: false
steps:
Expand All @@ -36,8 +36,12 @@ jobs:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Update NPM (Node.js v10)
if: matrix.node-version == 10
run: npm install --global npm@7
- name: Update NPM
run: npm install --global npm
if: matrix.node-version != 10
run: npm install --global npm@8
- name: Run tests
run: npm test --ignore-scripts
- name: Publish coverage report to Coveralls
Expand Down Expand Up @@ -67,7 +71,7 @@ jobs:
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Verify code linting
Expand All @@ -83,7 +87,7 @@ jobs:
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: 14
node-version: 16
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Verify commit linting
Expand Down
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,13 @@ before_install: |
exit 2
fi
done
NODEJS_VERSION=$(node --version)
if [ 'v10' == ${NODEJS_VERSION%%.*} ]
then
npm install --global npm@7
else
npm install --global npm@8
fi
install:
- npm install --global npm
- npm ci --ignore-scripts
script: npm test --ignore-scripts

0 comments on commit 2f61960

Please sign in to comment.