Skip to content

Commit

Permalink
ci: stop using actions/cache as setup-node supports caching itself
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensby committed Jul 24, 2024
1 parent 90c7cfe commit e1523b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 32 deletions.
18 changes: 2 additions & 16 deletions .github/workflows/tests-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit e1523b7

Please sign in to comment.