mirror of
https://github.com/actions/cache.git
synced 2025-06-23 10:58:03 +02:00
Attempt to delete the archive after extraction (#209)
This reduces storage space used once the Action has finished executing.
This commit is contained in:
@ -241,6 +241,7 @@ test("restore with cache found", async () => {
|
||||
.mockReturnValue(fileSize);
|
||||
|
||||
const extractTarMock = jest.spyOn(tar, "extractTar");
|
||||
const unlinkFileMock = jest.spyOn(actionUtils, "unlinkFile");
|
||||
const setCacheHitOutputMock = jest.spyOn(actionUtils, "setCacheHitOutput");
|
||||
|
||||
await run();
|
||||
@ -258,6 +259,9 @@ test("restore with cache found", async () => {
|
||||
expect(extractTarMock).toHaveBeenCalledTimes(1);
|
||||
expect(extractTarMock).toHaveBeenCalledWith(archivePath, cachePath);
|
||||
|
||||
expect(unlinkFileMock).toHaveBeenCalledTimes(1);
|
||||
expect(unlinkFileMock).toHaveBeenCalledWith(archivePath);
|
||||
|
||||
expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1);
|
||||
expect(setCacheHitOutputMock).toHaveBeenCalledWith(true);
|
||||
|
||||
|
Reference in New Issue
Block a user