mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-12-23 12:36:01 +01:00
Fixed test cases
This commit is contained in:
parent
782b0bd3df
commit
12a1a354bd
8 changed files with 122305 additions and 9 deletions
61139
dist/restore-only/index.js
vendored
Normal file
61139
dist/restore-only/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
dist/restore/index.js
vendored
2
dist/restore/index.js
vendored
|
@ -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
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
2
dist/save/index.js
vendored
|
@ -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) {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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'
|
||||
|
||||
color: 'gray-dark'
|
|
@ -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'
|
||||
color: 'gray-dark'
|
||||
|
|
|
@ -6,7 +6,9 @@ export enum Inputs {
|
|||
}
|
||||
|
||||
export enum Outputs {
|
||||
CacheHit = "cache-hit"
|
||||
CacheHit = "cache-hit",
|
||||
Key = "key",
|
||||
MatchedKey = "matched-key"
|
||||
}
|
||||
|
||||
export enum State {
|
||||
|
|
Loading…
Reference in a new issue