Skip to content

Commit

Permalink
use cache option in node setup instead of explicit cache phase
Browse files Browse the repository at this point in the history
  • Loading branch information
rikukissa committed Jan 3, 2025
1 parent 6054699 commit 151fed8
Showing 1 changed file with 3 additions and 30 deletions.
33 changes: 3 additions & 30 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Extract dependencies for client
id: extract-dependencies
Expand Down Expand Up @@ -199,16 +200,6 @@ jobs:
fi
done
- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
~/.cache/yarn/v6
key: node-${{ hashFiles('**/yarn.lock', format('{0}/{1}','packages/client','package.json')) }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: CI="" yarn install --frozen-lockfile

Expand Down Expand Up @@ -244,16 +235,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
~/.cache/yarn/v6
key: node-${{ hashFiles('**/yarn.lock', format('{0}/{1}','packages/client','package.json')) }}
restore-keys: |
${{ runner.os }}-node-
cache: 'yarn'

- name: Install dependencies
run: CI="" yarn install --frozen-lockfile
Expand Down Expand Up @@ -284,16 +266,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Cache Node.js dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
~/.cache/yarn/v6
key: node-${{ hashFiles('**/yarn.lock', format('{0}/{1}','packages/client','package.json')) }}
restore-keys: |
${{ runner.os }}-node-
cache: 'yarn'

- name: Install dependencies
run: CI="" yarn install --frozen-lockfile
Expand Down

0 comments on commit 151fed8

Please sign in to comment.