fix: cache-hit output

This commit is contained in:
Ryo Mimura 2024-05-22 11:37:51 +09:00
parent 0c45773b62
commit 688d5d4688
4 changed files with 5 additions and 2 deletions

View file

@ -86,7 +86,8 @@ test("restore with no cache found", async () => {
); );
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key); expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
expect(outputMock).toHaveBeenCalledTimes(1); expect(outputMock).toHaveBeenCalledWith("cache-hit", "false");
expect(outputMock).toHaveBeenCalledTimes(2);
expect(failedMock).toHaveBeenCalledTimes(0); expect(failedMock).toHaveBeenCalledTimes(0);
expect(infoMock).toHaveBeenCalledWith( expect(infoMock).toHaveBeenCalledWith(

View file

@ -59422,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) {
primaryKey, primaryKey,
...restoreKeys ...restoreKeys
].join(", ")}`); ].join(", ")}`);
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
return; return;
} }
// Store the matched cache key in states // Store the matched cache key in states

View file

@ -59422,6 +59422,7 @@ function restoreImpl(stateProvider, earlyExit) {
primaryKey, primaryKey,
...restoreKeys ...restoreKeys
].join(", ")}`); ].join(", ")}`);
core.setOutput(constants_1.Outputs.CacheHit, false.toString());
return; return;
} }
// Store the matched cache key in states // Store the matched cache key in states

View file

@ -62,7 +62,7 @@ export async function restoreImpl(
...restoreKeys ...restoreKeys
].join(", ")}` ].join(", ")}`
); );
core.setOutput(Outputs.CacheHit, false.toString());
return; return;
} }