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 committed Nov 25, 2021
1 parent 12e1a8c commit 12eb27d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Update NPM (Node.js v10)
if: matrix.node-version == 10
run: npm install --global npm@7
- name: Update NPM
run: npm install -g npm
if: matrix.node-version != 10
run: npm install --global npm@8
- name: Bootstrap project
run: npm ci --ignore-scripts
- name: Run tests
Expand Down
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ arch:
branches:
only: master
language: node_js
before_install: npm install --global npm
before_install:
NODEJS_VERSION=$(node --version)
if [ 'v10' == ${NODEJS_VERSION%%.*} ]
then
npm install --global npm@7
else
npm install --global npm@8
fi
install: npm ci --ignore-scripts
script: npm test --ignore-scripts
node_js:
Expand Down

0 comments on commit 12eb27d

Please sign in to comment.