mirror of https://github.com/actions/cache.git
npm run format
parent
150eacd6fa
commit
1729a4d479
@ -1,17 +1,17 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Jest Test",
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
|
||||
"args": ["--runInBand", "--config=${workspaceFolder}/jest.config.js"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
},
|
||||
]
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"name": "Jest Test",
|
||||
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
|
||||
"args": ["--runInBand", "--config=${workspaceFolder}/jest.config.js"],
|
||||
"console": "integratedTerminal",
|
||||
"internalConsoleOptions": "neverOpen"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,24 +1,24 @@
|
||||
name: 'Cache'
|
||||
description: 'Cache artifacts like dependencies and build outputs to improve workflow execution time'
|
||||
author: 'GitHub'
|
||||
name: "Cache"
|
||||
description: "Cache artifacts like dependencies and build outputs to improve workflow execution time"
|
||||
author: "GitHub"
|
||||
inputs:
|
||||
path:
|
||||
description: 'A directory to store and save the cache'
|
||||
description: "A directory to store and save the cache"
|
||||
required: true
|
||||
key:
|
||||
description: 'An explicit key for restoring and saving the cache'
|
||||
description: "An explicit key for restoring and saving the cache"
|
||||
required: true
|
||||
restore-keys:
|
||||
description: 'An ordered list of keys to use for restoring the cache if no cache hit occurred for key'
|
||||
description: "An ordered list of keys to use for restoring the cache if no cache hit occurred for key"
|
||||
required: false
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: 'A boolean value to indicate an exact match was found for the primary key'
|
||||
description: "A boolean value to indicate an exact match was found for the primary key"
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/restore/index.js'
|
||||
post: 'dist/save/index.js'
|
||||
post-if: 'success()'
|
||||
using: "node12"
|
||||
main: "dist/restore/index.js"
|
||||
post: "dist/save/index.js"
|
||||
post-if: "success()"
|
||||
branding:
|
||||
icon: 'archive'
|
||||
color: 'gray-dark'
|
||||
icon: "archive"
|
||||
color: "gray-dark"
|
||||
|
@ -1,23 +1,23 @@
|
||||
require("nock").disableNetConnect();
|
||||
|
||||
module.exports = {
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ["js", "ts"],
|
||||
testEnvironment: "node",
|
||||
testMatch: ["**/*.test.ts"],
|
||||
testRunner: "jest-circus/runner",
|
||||
transform: {
|
||||
"^.+\\.ts$": "ts-jest"
|
||||
},
|
||||
verbose: true
|
||||
clearMocks: true,
|
||||
moduleFileExtensions: ["js", "ts"],
|
||||
testEnvironment: "node",
|
||||
testMatch: ["**/*.test.ts"],
|
||||
testRunner: "jest-circus/runner",
|
||||
transform: {
|
||||
"^.+\\.ts$": "ts-jest",
|
||||
},
|
||||
verbose: true,
|
||||
};
|
||||
|
||||
const processStdoutWrite = process.stdout.write.bind(process.stdout);
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
process.stdout.write = (str, encoding, cb) => {
|
||||
// Core library will directly call process.stdout.write for commands
|
||||
// We don't want :: commands to be executed by the runner during tests
|
||||
if (!str.match(/^::/)) {
|
||||
return processStdoutWrite(str, encoding, cb);
|
||||
}
|
||||
// Core library will directly call process.stdout.write for commands
|
||||
// We don't want :: commands to be executed by the runner during tests
|
||||
if (!str.match(/^::/)) {
|
||||
return processStdoutWrite(str, encoding, cb);
|
||||
}
|
||||
};
|
||||
|
@ -1,22 +1,22 @@
|
||||
export enum Inputs {
|
||||
Key = "key",
|
||||
Path = "path",
|
||||
RestoreKeys = "restore-keys"
|
||||
RestoreKeys = "restore-keys",
|
||||
}
|
||||
|
||||
export enum Outputs {
|
||||
CacheHit = "cache-hit"
|
||||
CacheHit = "cache-hit",
|
||||
}
|
||||
|
||||
export enum State {
|
||||
CacheKey = "CACHE_KEY",
|
||||
CacheResult = "CACHE_RESULT"
|
||||
CacheResult = "CACHE_RESULT",
|
||||
}
|
||||
|
||||
export enum Events {
|
||||
Key = "GITHUB_EVENT_NAME",
|
||||
Push = "push",
|
||||
PullRequest = "pull_request"
|
||||
PullRequest = "pull_request",
|
||||
}
|
||||
|
||||
export const CacheFilename = "cache.tgz";
|
||||
|
Loading…
Reference in New Issue