From 29e69b0d4d478dd0e893fc845a66aa2f425428e7 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Wed, 15 Apr 2020 00:40:19 -0400 Subject: [PATCH] Cache node_modules in CI --- .github/workflows/tests.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e69502a057..6e24875c75 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: