Skip to content

Commit e1523b7

Browse files
committed
ci: stop using actions/cache as setup-node supports caching itself
1 parent 90c7cfe commit e1523b7

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

.github/workflows/tests-release.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,7 @@ jobs:
4848
uses: actions/setup-node@v3
4949
with:
5050
node-version: ${{ matrix.node }}
51-
52-
- name: Cache dependencies ${{ matrix.node }}
53-
uses: actions/cache@v3
54-
with:
55-
path: ~/.npm
56-
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
57-
restore-keys: |
58-
${{ runner.os }}-node-${{ matrix.node }}
51+
cache: npm
5952
# for this workflow we also require npm audit to pass
6053
- run: npm i
6154
- run: npm run test:coverage
@@ -96,14 +89,7 @@ jobs:
9689
uses: actions/setup-node@v3
9790
with:
9891
node-version: ${{ matrix.node }}
99-
100-
- name: Cache dependencies ${{ matrix.node }}
101-
uses: actions/cache@v3
102-
with:
103-
path: ~/.npm
104-
key: ${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server-${{ hashFiles('github/testing/express/**/package-lock.json') }}
105-
restore-keys: |
106-
${{ runner.os }}-node-${{ matrix.node }}-node-oauth/express-oauth-server
92+
cache: npm
10793

10894
# in order to test the adapter we need to use the current checkout
10995
# and install it as local dependency

.github/workflows/tests.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ jobs:
2424
uses: actions/setup-node@v3
2525
with:
2626
node-version: 20
27-
28-
- name: cache dependencies
29-
uses: actions/cache@v3
30-
with:
31-
path: ~/.npm
32-
key: ${{ runner.os }}-node-16-${{ hashFiles('**/package-lock.json') }}
33-
restore-keys: |
34-
${{ runner.os }}-node-
27+
cache: npm
3528
- run: npm install
3629
- run: npm run lint
3730

@@ -50,14 +43,7 @@ jobs:
5043
uses: actions/setup-node@v3
5144
with:
5245
node-version: ${{ matrix.node }}
53-
54-
- name: Cache dependencies ${{ matrix.node }}
55-
uses: actions/cache@v3
56-
with:
57-
path: ~/.npm
58-
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
59-
restore-keys: |
60-
${{ runner.os }}-node-${{ matrix.node }}
46+
cache: npm
6147
- run: npm i
6248
- run: npm run test:coverage
6349

0 commit comments

Comments
 (0)