Skip to content

Commit 1c1c94b

Browse files
lunnysilverwind
andauthored
Enable npm cache on setup-node action (#30577) (#30590)
Backport #30577 Enable npm dependency cache in [setup-node](https://github.com/actions/setup-node). This should work reliably and across branches as well. --------- Co-authored-by: silverwind <me@silverwind.io>
1 parent 0e20ccf commit 1c1c94b

File tree

5 files changed

+21
-7
lines changed

5 files changed

+21
-7
lines changed

.github/workflows/pull-compliance.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ jobs:
5858
runs-on: ubuntu-latest
5959
steps:
6060
- uses: actions/checkout@v4
61-
- uses: actions/setup-node@v3
61+
- uses: actions/setup-node@v4
6262
with:
6363
node-version: 20
64+
cache: npm
65+
cache-dependency-path: package-lock.json
6466
- run: make deps-frontend
6567
- run: make lint-swagger
6668

@@ -127,9 +129,11 @@ jobs:
127129
runs-on: ubuntu-latest
128130
steps:
129131
- uses: actions/checkout@v4
130-
- uses: actions/setup-node@v3
132+
- uses: actions/setup-node@v4
131133
with:
132134
node-version: 20
135+
cache: npm
136+
cache-dependency-path: package-lock.json
133137
- run: make deps-frontend
134138
- run: make lint-frontend
135139
- run: make checks-frontend
@@ -174,9 +178,11 @@ jobs:
174178
runs-on: ubuntu-latest
175179
steps:
176180
- uses: actions/checkout@v4
177-
- uses: actions/setup-node@v3
181+
- uses: actions/setup-node@v4
178182
with:
179183
node-version: 20
184+
cache: npm
185+
cache-dependency-path: package-lock.json
180186
- run: make deps-frontend
181187
- run: make lint-md
182188
- run: make docs

.github/workflows/pull-e2e-tests.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ jobs:
2121
with:
2222
go-version: "~1.21"
2323
check-latest: true
24-
- uses: actions/setup-node@v3
24+
- uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
27+
cache: npm
28+
cache-dependency-path: package-lock.json
2729
- run: make deps-frontend frontend deps-backend
2830
- run: npx playwright install --with-deps
2931
- run: make test-e2e-sqlite

.github/workflows/release-nightly.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ jobs:
2020
with:
2121
go-version: "~1.21"
2222
check-latest: true
23-
- uses: actions/setup-node@v3
23+
- uses: actions/setup-node@v4
2424
with:
2525
node-version: 20
26+
cache: npm
27+
cache-dependency-path: package-lock.json
2628
- run: make deps-frontend deps-backend
2729
# xgo build
2830
- run: make release

.github/workflows/release-tag-rc.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ jobs:
2121
with:
2222
go-version: "~1.21"
2323
check-latest: true
24-
- uses: actions/setup-node@v3
24+
- uses: actions/setup-node@v4
2525
with:
2626
node-version: 20
27+
cache: npm
28+
cache-dependency-path: package-lock.json
2729
- run: make deps-frontend deps-backend
2830
# xgo build
2931
- run: make release

.github/workflows/release-tag-version.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
with:
2424
go-version: "~1.21"
2525
check-latest: true
26-
- uses: actions/setup-node@v3
26+
- uses: actions/setup-node@v4
2727
with:
2828
node-version: 20
29+
cache: npm
30+
cache-dependency-path: package-lock.json
2931
- run: make deps-frontend deps-backend
3032
# xgo build
3133
- run: make release

0 commit comments

Comments
 (0)