Cache node_modules in CI
This commit is contained in:
11
.github/workflows/tests.yml
vendored
11
.github/workflows/tests.yml
vendored
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user