Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65b8989

Browse files
authored
Merge pull request#1284 from takost/update-to-node-20
Update action to node20
2 parentse12d46a +d0be34d commit65b8989

File tree

18 files changed

+218868
-220936
lines changed

18 files changed

+218868
-220936
lines changed

‎.github/workflows/check-dist.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ jobs:
1515
call-check-dist:
1616
name:Check dist/
1717
uses:actions/reusable-workflows/.github/workflows/check-dist.yml@main
18+
with:
19+
node-version:"20.x"

‎.github/workflows/workflow.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
steps:
2222
-name:Checkout
2323
uses:actions/checkout@v3
24-
-name:Setup Node.js16.x
24+
-name:Setup Node.js20.x
2525
uses:actions/setup-node@v3
2626
with:
27-
node-version:16.x
27+
node-version:20.x
2828
cache:npm
2929
-run:npm ci
3030
-name:Prettier Format Check

‎RELEASES.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,7 @@
116116

117117
- Updates@actions/cache to v3.2.3 to fix accidental mutated path arguments to`getCacheVersion`[actions/toolkit#1378](https://github.com/actions/toolkit/pull/1378)
118118
- Additional audit fixes of npm package(s)
119+
120+
###4.0.0
121+
122+
- Updated minimum runner version support from node 12 -> node 20

‎__tests__/save.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as cache from "@actions/cache";
22
import*ascorefrom"@actions/core";
33

44
import{Events,Inputs,RefKey}from"../src/constants";
5-
importrunfrom"../src/save";
5+
import{saveRun}from"../src/saveImpl";
66
import*asactionUtilsfrom"../src/utils/actionUtils";
77
import*astestUtilsfrom"../src/utils/testUtils";
88

@@ -100,7 +100,7 @@ test("save with valid inputs uploads a cache", async () => {
100100
returnPromise.resolve(cacheId);
101101
});
102102

103-
awaitrun();
103+
awaitsaveRun();
104104

105105
expect(saveCacheMock).toHaveBeenCalledTimes(1);
106106
expect(saveCacheMock).toHaveBeenCalledWith(

‎__tests__/saveImpl.test.ts‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as cache from "@actions/cache";
22
import*ascorefrom"@actions/core";
33

44
import{Events,Inputs,RefKey}from"../src/constants";
5-
importrunfrom"../src/saveImpl";
5+
import{saveImpl}from"../src/saveImpl";
66
import{StateProvider}from"../src/stateProvider";
77
import*asactionUtilsfrom"../src/utils/actionUtils";
88
import*astestUtilsfrom"../src/utils/testUtils";
@@ -77,7 +77,7 @@ test("save with invalid event outputs warning", async () => {
7777
constinvalidEvent="commit_comment";
7878
process.env[Events.Key]=invalidEvent;
7979
deleteprocess.env[RefKey];
80-
awaitrun(newStateProvider());
80+
awaitsaveImpl(newStateProvider());
8181
expect(logWarningMock).toHaveBeenCalledWith(
8282
`Event Validation Error: The event type${invalidEvent} is not supported because it's not tied to a branch or tag ref.`
8383
);
@@ -100,7 +100,7 @@ test("save with no primary key in state outputs warning", async () => {
100100
});
101101
constsaveCacheMock=jest.spyOn(cache,"saveCache");
102102

103-
awaitrun(newStateProvider());
103+
awaitsaveImpl(newStateProvider());
104104

105105
expect(saveCacheMock).toHaveBeenCalledTimes(0);
106106
expect(logWarningMock).toHaveBeenCalledWith(`Key is not specified.`);
@@ -115,7 +115,7 @@ test("save without AC available should no-op", async () => {
115115

116116
constsaveCacheMock=jest.spyOn(cache,"saveCache");
117117

118-
awaitrun(newStateProvider());
118+
awaitsaveImpl(newStateProvider());
119119

120120
expect(saveCacheMock).toHaveBeenCalledTimes(0);
121121
});
@@ -128,7 +128,7 @@ test("save on ghes without AC available should no-op", async () => {
128128

129129
constsaveCacheMock=jest.spyOn(cache,"saveCache");
130130

131-
awaitrun(newStateProvider());
131+
awaitsaveImpl(newStateProvider());
132132

133133
expect(saveCacheMock).toHaveBeenCalledTimes(0);
134134
});
@@ -161,7 +161,7 @@ test("save on GHES with AC available", async () => {
161161
returnPromise.resolve(cacheId);
162162
});
163163

164-
awaitrun(newStateProvider());
164+
awaitsaveImpl(newStateProvider());
165165

166166
expect(saveCacheMock).toHaveBeenCalledTimes(1);
167167
expect(saveCacheMock).toHaveBeenCalledWith(
@@ -194,7 +194,7 @@ test("save with exact match returns early", async () => {
194194
});
195195
constsaveCacheMock=jest.spyOn(cache,"saveCache");
196196

197-
awaitrun(newStateProvider());
197+
awaitsaveImpl(newStateProvider());
198198

199199
expect(saveCacheMock).toHaveBeenCalledTimes(0);
200200
expect(infoMock).toHaveBeenCalledWith(
@@ -221,7 +221,7 @@ test("save with missing input outputs warning", async () => {
221221
});
222222
constsaveCacheMock=jest.spyOn(cache,"saveCache");
223223

224-
awaitrun(newStateProvider());
224+
awaitsaveImpl(newStateProvider());
225225

226226
expect(saveCacheMock).toHaveBeenCalledTimes(0);
227227
expect(logWarningMock).toHaveBeenCalledWith(
@@ -259,7 +259,7 @@ test("save with large cache outputs warning", async () => {
259259
);
260260
});
261261

262-
awaitrun(newStateProvider());
262+
awaitsaveImpl(newStateProvider());
263263

264264
expect(saveCacheMock).toHaveBeenCalledTimes(1);
265265
expect(saveCacheMock).toHaveBeenCalledWith(
@@ -306,7 +306,7 @@ test("save with reserve cache failure outputs warning", async () => {
306306
throwerror;
307307
});
308308

309-
awaitrun(newStateProvider());
309+
awaitsaveImpl(newStateProvider());
310310

311311
expect(saveCacheMock).toHaveBeenCalledTimes(1);
312312
expect(saveCacheMock).toHaveBeenCalledWith(
@@ -349,7 +349,7 @@ test("save with server error outputs warning", async () => {
349349
thrownewError("HTTP Error Occurred");
350350
});
351351

352-
awaitrun(newStateProvider());
352+
awaitsaveImpl(newStateProvider());
353353

354354
expect(saveCacheMock).toHaveBeenCalledTimes(1);
355355
expect(saveCacheMock).toHaveBeenCalledWith(
@@ -392,7 +392,7 @@ test("save with valid inputs uploads a cache", async () => {
392392
returnPromise.resolve(cacheId);
393393
});
394394

395-
awaitrun(newStateProvider());
395+
awaitsaveImpl(newStateProvider());
396396

397397
expect(saveCacheMock).toHaveBeenCalledTimes(1);
398398
expect(saveCacheMock).toHaveBeenCalledWith(

‎__tests__/saveOnly.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as cache from "@actions/cache";
22
import*ascorefrom"@actions/core";
33

44
import{Events,Inputs,RefKey}from"../src/constants";
5-
importrunfrom"../src/saveOnly";
5+
import{saveOnlyRun}from"../src/saveImpl";
66
import*asactionUtilsfrom"../src/utils/actionUtils";
77
import*astestUtilsfrom"../src/utils/testUtils";
88

@@ -90,7 +90,7 @@ test("save with valid inputs uploads a cache", async () => {
9090
returnPromise.resolve(cacheId);
9191
});
9292

93-
awaitrun();
93+
awaitsaveOnlyRun();
9494

9595
expect(saveCacheMock).toHaveBeenCalledTimes(1);
9696
expect(saveCacheMock).toHaveBeenCalledWith(
@@ -122,7 +122,7 @@ test("save failing logs the warning message", async () => {
122122
returnPromise.resolve(cacheId);
123123
});
124124

125-
awaitrun();
125+
awaitsaveOnlyRun();
126126

127127
expect(saveCacheMock).toHaveBeenCalledTimes(1);
128128
expect(saveCacheMock).toHaveBeenCalledWith(

‎action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ outputs:
3030
cache-hit:
3131
description:'A boolean value to indicate an exact match was found for the primary key'
3232
runs:
33-
using:'node16'
33+
using:'node20'
3434
main:'dist/restore/index.js'
3535
post:'dist/save/index.js'
3636
post-if:success()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp