Cache node_modules in CI

This commit is contained in:
Elliot DeNolf
2020-04-15 00:40:19 -04:00
parent 79643282ea
commit 29e69b0d4d

View File

@@ -3,7 +3,7 @@ name: Node.js CI
on: [push]
jobs:
test:
build:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -15,6 +15,15 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- run: npm install
- run: nohup npm run server &
env: