Skip to content

Commit

Permalink
chore: prefer cache option of setup-node
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Feb 10, 2024
1 parent 08da123 commit 52e6e4c
Showing 1 changed file with 6 additions and 42 deletions.
48 changes: 6 additions & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Cache modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand All @@ -43,13 +37,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Cache modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand All @@ -66,13 +54,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Cache modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand All @@ -89,13 +71,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand All @@ -122,13 +98,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Cache npm
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand All @@ -154,13 +124,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
cache: "npm"
- name: Install dependencies
run: |
npm ci
Expand Down

0 comments on commit 52e6e4c

Please sign in to comment.