mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-03 08:49:54 +02:00
Use @actions/glob for pattern matching
This commit is contained in:
parent
1e233443e8
commit
db235cfc56
12 changed files with 4427 additions and 176 deletions
|
@ -7,13 +7,11 @@ import run from "../src/save";
|
|||
import * as tar from "../src/tar";
|
||||
import * as actionUtils from "../src/utils/actionUtils";
|
||||
import * as testUtils from "../src/utils/testUtils";
|
||||
import * as pathUtils from "../src/utils/pathUtils";
|
||||
|
||||
jest.mock("@actions/core");
|
||||
jest.mock("../src/cacheHttpClient");
|
||||
jest.mock("../src/tar");
|
||||
jest.mock("../src/utils/actionUtils");
|
||||
jest.mock("../src/utils/pathUtils");
|
||||
|
||||
beforeAll(() => {
|
||||
jest.spyOn(core, "getInput").mockImplementation((name, options) => {
|
||||
|
@ -42,9 +40,11 @@ beforeAll(() => {
|
|||
return actualUtils.getSupportedEvents();
|
||||
});
|
||||
|
||||
jest.spyOn(pathUtils, "expandPaths").mockImplementation(filePaths => {
|
||||
return filePaths.map(x => path.resolve(x));
|
||||
});
|
||||
jest.spyOn(actionUtils, "expandPaths").mockImplementation(
|
||||
async filePaths => {
|
||||
return filePaths.map(x => path.resolve(x));
|
||||
}
|
||||
);
|
||||
|
||||
jest.spyOn(actionUtils, "createTempDirectory").mockImplementation(() => {
|
||||
return Promise.resolve("/foo/bar");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue