Fixed test cases

This commit is contained in:
Sankalp Kotewar 2022-12-08 17:39:12 +00:00 committed by GitHub
parent 782b0bd3df
commit 12a1a354bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 122305 additions and 9 deletions

61139
dist/restore-only/index.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -4954,6 +4954,8 @@ var Inputs;
var Outputs;
(function (Outputs) {
Outputs["CacheHit"] = "cache-hit";
Outputs["Key"] = "key";
Outputs["MatchedKey"] = "matched-key";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
var State;
(function (State) {

61145
dist/save-only/index.js vendored Normal file

File diff suppressed because one or more lines are too long

2
dist/save/index.js vendored
View File

@ -4954,6 +4954,8 @@ var Inputs;
var Outputs;
(function (Outputs) {
Outputs["CacheHit"] = "cache-hit";
Outputs["Key"] = "key";
Outputs["MatchedKey"] = "matched-key";
})(Outputs = exports.Outputs || (exports.Outputs = {}));
var State;
(function (State) {

View File

@ -5,7 +5,7 @@
"description": "Cache dependencies and build outputs",
"main": "dist/restore/index.js",
"scripts": {
"build": "tsc && ncc build -o dist/restore src/restore.ts && ncc build -o dist/save src/save.ts",
"build": "tsc && ncc build -o dist/restore src/restore.ts && ncc build -o dist/save src/save.ts && ncc build -o dist/restore-only src/restoreOnly.ts && ncc build -o dist/save-only src/saveOnly.ts",
"test": "tsc --noEmit && jest --coverage",
"lint": "eslint **/*.ts --cache",
"format": "prettier --write **/*.ts",

View File

@ -1,4 +1,4 @@
name: 'Restore Cache'
name: 'Restore Only Cache'
description: 'Restore Cache artifacts like dependencies and build outputs to improve workflow execution time'
author: 'GitHub'
inputs:
@ -14,10 +14,13 @@ inputs:
outputs:
cache-hit:
description: 'A boolean value to indicate an exact match was found for the primary key'
key:
description: 'Key passed in the input to use in subsequent steps of the workflow'
matched-key:
description: 'Cache key restored'
runs:
using: 'node16'
main: '../dist/restore/index.js'
main: '../dist/restore-only/index.js'
branding:
icon: 'archive'
color: 'gray-dark'

View File

@ -1,4 +1,4 @@
name: 'Save Cache'
name: 'Save Only Cache'
description: 'Save Cache artifacts like dependencies and build outputs to improve workflow execution time'
author: 'GitHub'
inputs:
@ -11,9 +11,12 @@ inputs:
upload-chunk-size:
description: 'The chunk size used to split up large files during upload, in bytes'
required: false
matched-key:
description: 'Cache key restored from the restore action'
required: false
runs:
using: 'node16'
main: '../dist/save/index.js'
main: '../dist/save-only/index.js'
branding:
icon: 'archive'
color: 'gray-dark'

View File

@ -6,7 +6,9 @@ export enum Inputs {
}
export enum Outputs {
CacheHit = "cache-hit"
CacheHit = "cache-hit",
Key = "key",
MatchedKey = "matched-key"
}
export enum State {