Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Commit

Permalink
ci: use cache feature of @actions/setup-node
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Mar 14, 2024
1 parent 2edde93 commit 6cf8d0f
Showing 1 changed file with 5 additions and 20 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/test-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Keep npm cache around to speed up installs
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
cache: "npm"

- name: Install dependencies
run: npm ci --no-audit
Expand Down Expand Up @@ -130,7 +125,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.x"

cache: "npm"
- name: Create resource group
id: resource-group
run: |
Expand Down Expand Up @@ -178,7 +173,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.x"

cache: "npm"
- name: Create integration resources
id: resources
run: |
Expand Down Expand Up @@ -255,12 +250,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Keep npm cache around to speed up installs
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
cache: "npm"

- name: Install dependencies
run: npm ci --no-audit
Expand Down Expand Up @@ -359,12 +349,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: "20.x"

- name: Keep npm cache around to speed up installs
uses: actions/cache@v4
with:
path: ~/.npm
key: build-${{ hashFiles('**/package-lock.json') }}
cache: "npm"

- name: Install dependencies
run: npm ci --no-audit
Expand Down

0 comments on commit 6cf8d0f

Please sign in to comment.