From e1523b7eb05fa4836bc5d31e1412bcc32df74ce4 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 24 Jul 2024 15:47:07 +0100 Subject: [PATCH] ci: stop using actions/cache as setup-node supports caching itself --- .github/workflows/tests-release.yml | 18 ++---------------- .github/workflows/tests.yml | 18 ++---------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.github/workflows/tests-release.yml b/.github/workflows/tests-release.yml index 2bd4e253..48fc8521 100644 --- a/.github/workflows/tests-release.yml +++ b/.github/workflows/tests-release.yml @@ -48,14 +48,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Cache dependencies ${{ matrix.node }} - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ matrix.node }} + cache: npm # for this workflow we also require npm audit to pass - run: npm i - run: npm run test:coverage @@ -96,14 +89,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Cache dependencies ${{ matrix.node }} - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server-${{ hashFiles('github/testing/express/**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server + cache: npm # in order to test the adapter we need to use the current checkout # and install it as local dependency diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 37b8e220..bea8ee53 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,14 +24,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: 20 - - - name: cache dependencies - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + cache: npm - run: npm install - run: npm run lint @@ -50,14 +43,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Cache dependencies ${{ matrix.node }} - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node-${{ matrix.node }} + cache: npm - run: npm i - run: npm run test:coverage