mirror of
https://gitea.com/actions/cache.git
synced 2026-06-12 14:52:05 +08:00
Compare commits
6 Commits
5a912e8b4a
...
e9b91fdc3f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9b91fdc3f | ||
|
|
e4884b8ff7 | ||
|
|
10baf0191a | ||
|
|
e39b386c90 | ||
|
|
b692820337 | ||
|
|
60749128a4 |
2
.licenses/npm/@actions/cache.dep.yml
generated
2
.licenses/npm/@actions/cache.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/cache"
|
||||
version: 5.0.5
|
||||
version: 6.0.1
|
||||
type: npm
|
||||
summary: Actions cache lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/cache
|
||||
|
||||
2
.licenses/npm/@actions/core.dep.yml
generated
2
.licenses/npm/@actions/core.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/core"
|
||||
version: 2.0.3
|
||||
version: 3.0.1
|
||||
type: npm
|
||||
summary: Actions core lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/core
|
||||
|
||||
2
.licenses/npm/@actions/exec.dep.yml
generated
2
.licenses/npm/@actions/exec.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/exec"
|
||||
version: 2.0.0
|
||||
version: 3.0.0
|
||||
type: npm
|
||||
summary: Actions exec lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/exec
|
||||
|
||||
2
.licenses/npm/@actions/glob.dep.yml
generated
2
.licenses/npm/@actions/glob.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/glob"
|
||||
version: 0.5.1
|
||||
version: 0.6.1
|
||||
type: npm
|
||||
summary: Actions glob lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/glob
|
||||
|
||||
2
.licenses/npm/@actions/http-client.dep.yml
generated
2
.licenses/npm/@actions/http-client.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 3.0.2
|
||||
version: 4.0.1
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
|
||||
2
.licenses/npm/@actions/io.dep.yml
generated
2
.licenses/npm/@actions/io.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@actions/io"
|
||||
version: 2.0.0
|
||||
version: 3.0.2
|
||||
type: npm
|
||||
summary: Actions io lib
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/io
|
||||
|
||||
32
.licenses/npm/@azure/abort-controller-1.1.0.dep.yml
generated
32
.licenses/npm/@azure/abort-controller-1.1.0.dep.yml
generated
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: "@azure/abort-controller"
|
||||
version: 1.1.0
|
||||
type: npm
|
||||
summary: Microsoft Azure SDK for JavaScript - Aborter
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/abort-controller/README.md
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2020 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
notices: []
|
||||
2
.licenses/npm/@azure/core-http-compat.dep.yml
generated
2
.licenses/npm/@azure/core-http-compat.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@azure/core-http-compat"
|
||||
version: 2.3.1
|
||||
version: 2.4.0
|
||||
type: npm
|
||||
summary: Core HTTP Compatibility Library to bridge the gap between Core V1 & V2 packages.
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-compat/
|
||||
|
||||
2
.licenses/npm/@azure/core-rest-pipeline.dep.yml
generated
2
.licenses/npm/@azure/core-rest-pipeline.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@azure/core-rest-pipeline"
|
||||
version: 1.22.2
|
||||
version: 1.23.0
|
||||
type: npm
|
||||
summary: Isomorphic client library for making HTTP requests in node.js and browser.
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-rest-pipeline/
|
||||
|
||||
2
.licenses/npm/@azure/core-xml.dep.yml
generated
2
.licenses/npm/@azure/core-xml.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@azure/core-xml"
|
||||
version: 1.5.0
|
||||
version: 1.5.1
|
||||
type: npm
|
||||
summary: Core library for interacting with XML payloads
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/core/core-xml/
|
||||
|
||||
2
.licenses/npm/@azure/storage-blob.dep.yml
generated
2
.licenses/npm/@azure/storage-blob.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@azure/storage-blob"
|
||||
version: 12.30.0
|
||||
version: 12.31.0
|
||||
type: npm
|
||||
summary: Microsoft Azure Storage SDK for JavaScript - Blob
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-blob/
|
||||
|
||||
2
.licenses/npm/@azure/storage-common.dep.yml
generated
2
.licenses/npm/@azure/storage-common.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: "@azure/storage-common"
|
||||
version: 12.2.0
|
||||
version: 12.3.0
|
||||
type: npm
|
||||
summary: Azure Storage Common Client Library for JavaScript
|
||||
homepage: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/storage/storage-internal-avro/
|
||||
|
||||
11
.licenses/npm/@nodable/entities.dep.yml
generated
Normal file
11
.licenses/npm/@nodable/entities.dep.yml
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: "@nodable/entities"
|
||||
version: 2.1.0
|
||||
type: npm
|
||||
summary: Entity parser for XML, HTML, External entites with security and NCR control
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: README.md
|
||||
text: MIT
|
||||
notices: []
|
||||
2
.licenses/npm/fast-xml-builder.dep.yml
generated
2
.licenses/npm/fast-xml-builder.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: fast-xml-builder
|
||||
version: 1.1.4
|
||||
version: 1.2.0
|
||||
type: npm
|
||||
summary: Build XML from JSON without C/C++ based libraries
|
||||
homepage:
|
||||
|
||||
2
.licenses/npm/fast-xml-parser.dep.yml
generated
2
.licenses/npm/fast-xml-parser.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: fast-xml-parser
|
||||
version: 5.5.6
|
||||
version: 5.8.0
|
||||
type: npm
|
||||
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
|
||||
homepage:
|
||||
|
||||
2
.licenses/npm/path-expression-matcher.dep.yml
generated
2
.licenses/npm/path-expression-matcher.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: path-expression-matcher
|
||||
version: 1.1.3
|
||||
version: 1.5.0
|
||||
type: npm
|
||||
summary: Efficient path tracking and pattern matching for XML/JSON parsers
|
||||
homepage: https://github.com/NaturalIntelligence/path-expression-matcher#readme
|
||||
|
||||
2
.licenses/npm/semver.dep.yml
generated
2
.licenses/npm/semver.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: semver
|
||||
version: 6.3.1
|
||||
version: 7.8.0
|
||||
type: npm
|
||||
summary: The semantic version parser used by npm.
|
||||
homepage:
|
||||
|
||||
2
.licenses/npm/strnum.dep.yml
generated
2
.licenses/npm/strnum.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: strnum
|
||||
version: 2.1.2
|
||||
version: 2.3.0
|
||||
type: npm
|
||||
summary: Parse String to Number based on configuration
|
||||
homepage:
|
||||
|
||||
2
.licenses/npm/undici.dep.yml
generated
2
.licenses/npm/undici.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: undici
|
||||
version: 6.24.1
|
||||
version: 6.25.0
|
||||
type: npm
|
||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||
homepage: https://undici.nodejs.org
|
||||
|
||||
12
.licenses/npm/xml-naming.dep.yml
generated
Normal file
12
.licenses/npm/xml-naming.dep.yml
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: xml-naming
|
||||
version: 0.1.0
|
||||
type: npm
|
||||
summary: Validates XML name productions — Name, NCName, QName, NMToken, NMTokens —
|
||||
for XML 1.0 and 1.1
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: README.md
|
||||
text: MIT
|
||||
notices: []
|
||||
@@ -18,7 +18,7 @@ See ["Caching dependencies to speed up workflows"](https://docs.github.com/en/ac
|
||||
### ⚠️ Important changes
|
||||
|
||||
> [!IMPORTANT]
|
||||
> `actions/cache@v6` runs on the Node.js 24 runtime and requires a minimum Actions Runner version of `2.327.1`.
|
||||
> `actions/cache@v5` runs on the Node.js 24 runtime and requires a minimum Actions Runner version of `2.327.1`.
|
||||
> If you are using self-hosted runners, ensure they are updated before upgrading.
|
||||
|
||||
The cache backend service has been rewritten from the ground up for improved performance and reliability. [actions/cache](https://github.com/actions/cache) now integrates with the new cache service (v2) APIs.
|
||||
@@ -83,7 +83,7 @@ Create a workflow `.yml` file in your repository's `.github/workflows` directory
|
||||
|
||||
If you are using this inside a container, a POSIX-compliant `tar` needs to be included and accessible from the execution path.
|
||||
|
||||
Note: `actions/cache@v6` runs on Node.js 24 and requires a minimum Actions Runner version of `2.327.1`.
|
||||
Note: `actions/cache@v5` runs on Node.js 24 and requires a minimum Actions Runner version of `2.327.1`.
|
||||
|
||||
If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are required for [Cross-OS caching](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cross-os-cache) to work. They are also recommended to be installed in general so the performance is on par with `hosted` Windows runners.
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ let pristineEnv: NodeJS.ProcessEnv;
|
||||
beforeEach(() => {
|
||||
pristineEnv = { ...process.env };
|
||||
jest.clearAllMocks();
|
||||
(core.getInput as jest.Mock).mockImplementation(
|
||||
jest.mocked(core.getInput).mockImplementation(
|
||||
(name: string, options?: { required?: boolean }) => {
|
||||
const val =
|
||||
process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] ||
|
||||
@@ -217,12 +217,12 @@ test("getInputAsBool throws if required and value missing", () => {
|
||||
});
|
||||
|
||||
test("isCacheFeatureAvailable for ac enabled", () => {
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(true);
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
expect(actionUtils.isCacheFeatureAvailable()).toBe(true);
|
||||
});
|
||||
|
||||
test("isCacheFeatureAvailable for ac disabled on GHES", () => {
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(false);
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
|
||||
const message = `Cache action is only supported on GHES version >= 3.5. If you are on version >=3.5 Please check with GHES admin if Actions cache service is enabled or not.
|
||||
Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github Connect, please unretire the actions/cache namespace before upgrade (see https://docs.github.com/en/enterprise-server@3.5/admin/github-actions/managing-access-to-actions-from-githubcom/enabling-automatic-access-to-githubcom-actions-using-github-connect#automatic-retirement-of-namespaces-for-actions-accessed-on-githubcom)`;
|
||||
@@ -237,7 +237,7 @@ Otherwise please upgrade to GHES version >= 3.5 and If you are also using Github
|
||||
});
|
||||
|
||||
test("isCacheFeatureAvailable for ac disabled on dotcom", () => {
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(false);
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
|
||||
const message =
|
||||
"An internal error has occurred in cache backend. Please check https://www.githubstatus.com/ for any ongoing issue in actions.";
|
||||
|
||||
@@ -48,7 +48,7 @@ const testUtils = await import("../src/utils/testUtils");
|
||||
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks();
|
||||
(core.getInput as jest.Mock).mockImplementation(
|
||||
jest.mocked(core.getInput).mockImplementation(
|
||||
(name: string, options?: { required?: boolean }) => {
|
||||
const val =
|
||||
process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] ||
|
||||
@@ -59,8 +59,8 @@ beforeEach(() => {
|
||||
return val.trim();
|
||||
}
|
||||
);
|
||||
(core.getState as jest.Mock).mockReturnValue("");
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(true);
|
||||
jest.mocked(core.getState).mockReturnValue("");
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(true);
|
||||
process.env[Events.Key] = Events.Push;
|
||||
process.env[RefKey] = "refs/heads/feature-branch";
|
||||
});
|
||||
@@ -83,7 +83,7 @@ test("restore with invalid event outputs warning", async () => {
|
||||
});
|
||||
|
||||
test("restore without AC available should no-op", async () => {
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(false);
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -93,13 +93,21 @@ test("restore without AC available should no-op", async () => {
|
||||
});
|
||||
|
||||
test("restore on GHES without AC available should no-op", async () => {
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(false);
|
||||
process.env["GITHUB_SERVER_URL"] = "https://my-ghes-server.com";
|
||||
jest.mocked(cache.isFeatureAvailable).mockReturnValue(false);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
expect(cache.restoreCache).toHaveBeenCalledTimes(0);
|
||||
expect(core.setOutput).toHaveBeenCalledTimes(1);
|
||||
expect(core.setOutput).toHaveBeenCalledWith("cache-hit", "false");
|
||||
expect(core.info).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"Cache action is only supported on GHES version >= 3.5"
|
||||
)
|
||||
);
|
||||
|
||||
delete process.env["GITHUB_SERVER_URL"];
|
||||
});
|
||||
|
||||
test("restore on GHES with AC available ", async () => {
|
||||
@@ -111,7 +119,7 @@ test("restore on GHES with AC available ", async () => {
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(key);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(key);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -160,7 +168,7 @@ test("restore with too many keys should fail", async () => {
|
||||
restoreKeys,
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
(cache.restoreCache as jest.Mock).mockRejectedValue(
|
||||
jest.mocked(cache.restoreCache).mockRejectedValue(
|
||||
new Error("Key Validation Error: Keys are limited to a maximum of 10.")
|
||||
);
|
||||
await restoreImpl(new StateProvider());
|
||||
@@ -178,7 +186,7 @@ test("restore with large key should fail", async () => {
|
||||
key,
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
(cache.restoreCache as jest.Mock).mockRejectedValue(
|
||||
jest.mocked(cache.restoreCache).mockRejectedValue(
|
||||
new Error(
|
||||
`Key Validation Error: ${key} cannot be larger than 512 characters.`
|
||||
)
|
||||
@@ -198,7 +206,7 @@ test("restore with invalid key should fail", async () => {
|
||||
key,
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
(cache.restoreCache as jest.Mock).mockRejectedValue(
|
||||
jest.mocked(cache.restoreCache).mockRejectedValue(
|
||||
new Error(`Key Validation Error: ${key} cannot contain commas.`)
|
||||
);
|
||||
await restoreImpl(new StateProvider());
|
||||
@@ -217,7 +225,7 @@ test("restore with no cache found", async () => {
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(undefined);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(undefined);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -240,7 +248,7 @@ test("restore with restore keys and no cache found", async () => {
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(undefined);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(undefined);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -261,7 +269,7 @@ test("restore with cache found for key", async () => {
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(key);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(key);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -284,7 +292,7 @@ test("restore with cache found for restore key", async () => {
|
||||
enableCrossOsArchive: false
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(restoreKey);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(restoreKey);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
@@ -307,7 +315,7 @@ test("restore with lookup-only set", async () => {
|
||||
lookupOnly: true
|
||||
});
|
||||
|
||||
(cache.restoreCache as jest.Mock).mockResolvedValue(key);
|
||||
jest.mocked(cache.restoreCache).mockResolvedValue(key);
|
||||
|
||||
await restoreImpl(new StateProvider());
|
||||
|
||||
|
||||
@@ -101,11 +101,19 @@ test("save without AC available should no-op", async () => {
|
||||
});
|
||||
|
||||
test("save on ghes without AC available should no-op", async () => {
|
||||
process.env["GITHUB_SERVER_URL"] = "https://my-ghes-server.com";
|
||||
(cache.isFeatureAvailable as jest.Mock).mockReturnValue(false);
|
||||
|
||||
await saveImpl(new StateProvider());
|
||||
|
||||
expect(cache.saveCache).toHaveBeenCalledTimes(0);
|
||||
expect(core.info).toHaveBeenCalledWith(
|
||||
expect.stringContaining(
|
||||
"Cache action is only supported on GHES version >= 3.5"
|
||||
)
|
||||
);
|
||||
|
||||
delete process.env["GITHUB_SERVER_URL"];
|
||||
});
|
||||
|
||||
test("save on GHES with AC available", async () => {
|
||||
@@ -159,8 +167,8 @@ test("save with missing input outputs warning", async () => {
|
||||
const savedCacheKey = "Linux-node-";
|
||||
|
||||
(core.getState as jest.Mock)
|
||||
.mockReturnValueOnce(savedCacheKey)
|
||||
.mockReturnValueOnce(primaryKey);
|
||||
.mockReturnValueOnce(primaryKey)
|
||||
.mockReturnValueOnce(savedCacheKey);
|
||||
|
||||
await saveImpl(new StateProvider());
|
||||
|
||||
@@ -176,8 +184,8 @@ test("save with large cache outputs warning", async () => {
|
||||
const savedCacheKey = "Linux-node-";
|
||||
|
||||
(core.getState as jest.Mock)
|
||||
.mockReturnValueOnce(savedCacheKey)
|
||||
.mockReturnValueOnce(primaryKey);
|
||||
.mockReturnValueOnce(primaryKey)
|
||||
.mockReturnValueOnce(savedCacheKey);
|
||||
|
||||
const inputPath = "node_modules";
|
||||
testUtils.setInput(Inputs.Path, inputPath);
|
||||
@@ -202,8 +210,8 @@ test("save with reserve cache failure outputs warning", async () => {
|
||||
const savedCacheKey = "Linux-node-";
|
||||
|
||||
(core.getState as jest.Mock)
|
||||
.mockReturnValueOnce(savedCacheKey)
|
||||
.mockReturnValueOnce(primaryKey);
|
||||
.mockReturnValueOnce(primaryKey)
|
||||
.mockReturnValueOnce(savedCacheKey);
|
||||
|
||||
const inputPath = "node_modules";
|
||||
testUtils.setInput(Inputs.Path, inputPath);
|
||||
@@ -228,8 +236,8 @@ test("save with server error outputs warning", async () => {
|
||||
const savedCacheKey = "Linux-node-";
|
||||
|
||||
(core.getState as jest.Mock)
|
||||
.mockReturnValueOnce(savedCacheKey)
|
||||
.mockReturnValueOnce(primaryKey);
|
||||
.mockReturnValueOnce(primaryKey)
|
||||
.mockReturnValueOnce(savedCacheKey);
|
||||
|
||||
const inputPath = "node_modules";
|
||||
testUtils.setInput(Inputs.Path, inputPath);
|
||||
|
||||
91650
dist/restore-only/index.js
vendored
91650
dist/restore-only/index.js
vendored
File diff suppressed because one or more lines are too long
3
dist/restore-only/package.json
vendored
Normal file
3
dist/restore-only/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
91650
dist/restore/index.js
vendored
91650
dist/restore/index.js
vendored
File diff suppressed because one or more lines are too long
3
dist/restore/package.json
vendored
Normal file
3
dist/restore/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
91687
dist/save-only/index.js
vendored
91687
dist/save-only/index.js
vendored
File diff suppressed because one or more lines are too long
3
dist/save-only/package.json
vendored
Normal file
3
dist/save-only/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
91687
dist/save/index.js
vendored
91687
dist/save/index.js
vendored
File diff suppressed because one or more lines are too long
3
dist/save/package.json
vendored
Normal file
3
dist/save/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
export default {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ['js', 'ts'],
|
||||
roots: ['<rootDir>/__tests__'],
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/*.test.ts'],
|
||||
moduleFileExtensions: ["js", "ts"],
|
||||
roots: ["<rootDir>/__tests__"],
|
||||
testEnvironment: "node",
|
||||
testMatch: ["**/*.test.ts"],
|
||||
transform: {
|
||||
'^.+\\.ts$': [
|
||||
'ts-jest',
|
||||
"^.+\\.ts$": [
|
||||
"ts-jest",
|
||||
{
|
||||
useESM: true,
|
||||
diagnostics: {
|
||||
@@ -15,7 +15,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
extensionsToTreatAsEsm: ['.ts'],
|
||||
transformIgnorePatterns: ['node_modules/(?!(@actions)/)'],
|
||||
extensionsToTreatAsEsm: [".ts"],
|
||||
transformIgnorePatterns: ["node_modules/(?!(@actions)/)"],
|
||||
verbose: true
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"main": "dist/restore/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && ncc build -o dist/restore src/restore.ts && ncc build -o dist/save src/save.ts && ncc build -o dist/restore-only src/restoreOnly.ts && ncc build -o dist/save-only src/saveOnly.ts",
|
||||
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
|
||||
"test": "tsc --noEmit && node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
|
||||
"lint": "eslint **/*.ts --cache",
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts"
|
||||
|
||||
Reference in New Issue
Block a user