Only run tests on npm version 7+

NPM 7 introduced `set-script` which is needed to avoid running the
prepublish script on installation.
This commit is contained in:
Wolvan 2022-02-04 22:19:57 +01:00
parent bb6004f219
commit 934112de95

View file

@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
node-version: [10.x, 12.x, 14.x, 15.x, 16.x]
node-version: [15.x, 16.x]
steps:
- uses: actions/checkout@v2
@ -24,5 +24,5 @@ jobs:
- name: Install dependencies
run: npm set-script prepublish ""
- run: npm ci
- run: npm run build --if-present
- run: npm test
- run: npm test
- run: npm run build --if-present