Renamed variables and added tests

This commit is contained in:
Sankalp Kotewar 2022-12-11 13:33:36 +00:00 committed by GitHub
parent d91f5bd2fd
commit 3d4af52c52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 810 additions and 988 deletions

View file

@ -25,11 +25,7 @@ async function restoreImpl(
}
const primaryKey = core.getInput(Inputs.Key, { required: true });
stateProvider.setState(
State.CachePrimaryKey,
primaryKey,
Outputs.InputtedKey
);
stateProvider.setState(State.CachePrimaryKey, primaryKey);
const restoreKeys = utils.getInputAsArray(Inputs.RestoreKeys);
const cachePaths = utils.getInputAsArray(Inputs.Path, {
@ -54,11 +50,7 @@ async function restoreImpl(
}
// Store the matched cache key in states
stateProvider.setState(
State.CacheMatchedKey,
cacheKey,
Outputs.MatchedKey
);
stateProvider.setState(State.CacheMatchedKey, cacheKey);
const isExactKeyMatch = utils.isExactKeyMatch(
core.getInput(Inputs.Key, { required: true }),