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

@ -1,15 +1,14 @@
export enum Inputs {
Key = "key", // Input from cache, restore, save action
Path = "path", // Input from cache, restore, save action
RestoreKeys = "restore-keys", // Input from cache, restore action
UploadChunkSize = "upload-chunk-size", // Input from cache, save action
RestoredKey = "restored-key" // Input from save action
Key = "key", // Input for cache, restore, save action
Path = "path", // Input for cache, restore, save action
RestoreKeys = "restore-keys", // Input for cache, restore action
UploadChunkSize = "upload-chunk-size" // Input for cache, save action
}
export enum Outputs {
CacheHit = "cache-hit", // Output from cache, restore action
InputtedKey = "inputted-key", // Output from restore action
MatchedKey = "matched-key" // Output from restore action
CachePrimaryKey = "cache-primary-key", // Output from restore action
CacheRestoreKey = "cache-restore-key" // Output from restore action
}
export enum State {
@ -24,3 +23,8 @@ export enum Events {
}
export const RefKey = "GITHUB_REF";
export const stateToOutputMap = new Map<string, string>([
[State.CacheMatchedKey, Outputs.CacheRestoreKey],
[State.CachePrimaryKey, Outputs.CachePrimaryKey]
]);