Update node-js-ci workflow to fix broken npm installs

This commit is contained in:
David Humphrey 2021-03-20 11:32:38 -04:00
parent aacc8061cf
commit 5cf2495079
1 changed files with 3 additions and 17 deletions

View File

@ -11,31 +11,17 @@ on:
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.x, 14.x, 15.x]
node-version: [12.x, 14.x]
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Test
uses: actions/setup-node@v1
uses: actions/setup-node@v2.1.5
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test