From a3abf51623798d21476f224d14b750c27c8f4407 Mon Sep 17 00:00:00 2001 From: Julian Hammer Date: Thu, 21 Nov 2024 19:50:09 +0000 Subject: [PATCH] chore(ci): update GitHub Actions workflow to use actions/checkout@v2 and actions/cache@v2 for improved caching --- .github/workflows/test.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 313450f..03db250 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,17 +14,20 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - name: Cache npm - uses: actions/cache@v4 - id: npm-cache + - uses: actions/checkout@v2 + - name: Cache Node Modules + id: realgolfgames-logs-cache-node-modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: Install dependencies - id: npm-cache-dir - run: npm ci + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Install dependencies + if: steps.realgolfgames-logs-cache-node-modules.outputs.cache-hit != 'true' + run: npm install