Loading __tests__/restore.test.ts +1 −1 Changes for __tests__/restore.test.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ test("Fail restore when fail on cache miss is enabled and primary + restore keys ); expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key); expect(setCacheHitOutputMock).toHaveBeenCalledTimes(0); expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1); expect(failedMock).toHaveBeenCalledWith( `Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${key}` Loading __tests__/restoreOnly.test.ts +2 −1 Changes for __tests__/restoreOnly.test.ts: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ test("restore with no cache found", async () => { ); 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(infoMock).toHaveBeenCalledWith( Loading dist/restore-only/index.js +1 Changes for dist/restore-only/index.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -59415,6 +59415,7 @@ function restoreImpl(stateProvider, earlyExit) { const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); if (!cacheKey) { core.setOutput(constants_1.Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); } dist/restore/index.js +1 Changes for dist/restore/index.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -59415,6 +59415,7 @@ function restoreImpl(stateProvider, earlyExit) { const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); if (!cacheKey) { core.setOutput(constants_1.Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); } src/restoreImpl.ts +1 −1 Changes for src/restoreImpl.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ export async function restoreImpl( ); if (!cacheKey) { core.setOutput(Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error( `Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}` Loading @@ -62,7 +63,6 @@ export async function restoreImpl( ...restoreKeys ].join(", ")}` ); return; } Loading Loading
__tests__/restore.test.ts +1 −1 Changes for __tests__/restore.test.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -260,7 +260,7 @@ test("Fail restore when fail on cache miss is enabled and primary + restore keys ); expect(stateMock).toHaveBeenCalledWith("CACHE_KEY", key); expect(setCacheHitOutputMock).toHaveBeenCalledTimes(0); expect(setCacheHitOutputMock).toHaveBeenCalledTimes(1); expect(failedMock).toHaveBeenCalledWith( `Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${key}` Loading
__tests__/restoreOnly.test.ts +2 −1 Changes for __tests__/restoreOnly.test.ts: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ test("restore with no cache found", async () => { ); 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(infoMock).toHaveBeenCalledWith( Loading
dist/restore-only/index.js +1 Changes for dist/restore-only/index.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -59415,6 +59415,7 @@ function restoreImpl(stateProvider, earlyExit) { const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); if (!cacheKey) { core.setOutput(constants_1.Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); }
dist/restore/index.js +1 Changes for dist/restore/index.js: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -59415,6 +59415,7 @@ function restoreImpl(stateProvider, earlyExit) { const lookupOnly = utils.getInputAsBool(constants_1.Inputs.LookupOnly); const cacheKey = yield cache.restoreCache(cachePaths, primaryKey, restoreKeys, { lookupOnly: lookupOnly }, enableCrossOsArchive); if (!cacheKey) { core.setOutput(constants_1.Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error(`Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}`); }
src/restoreImpl.ts +1 −1 Changes for src/restoreImpl.ts: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -51,6 +51,7 @@ export async function restoreImpl( ); if (!cacheKey) { core.setOutput(Outputs.CacheHit, false.toString()); if (failOnCacheMiss) { throw new Error( `Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: ${primaryKey}` Loading @@ -62,7 +63,6 @@ export async function restoreImpl( ...restoreKeys ].join(", ")}` ); return; } Loading