diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54dc3c6..b189f27 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,33 +8,26 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [16.x] - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org/ - name: Cache node modules + id: cache uses: actions/cache@v3 env: - cache-name: build-cache-node-modules + cache-name: cache-node-modules with: - # npm cache files are stored in `~/.npm` on Linux/macOS - path: ~/.npm - key: ${{ runner.os }}-node-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ env.cache-name }}- + path: '**/node_modules' + key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' run: npm ci - name: Build from source