mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-24 04:29:16 +01:00
Fix tests
This commit is contained in:
parent
5e66b6cac9
commit
af9067e3c7
3 changed files with 11 additions and 5 deletions
2
.licenses/npm/@actions/cache.dep.yml
generated
2
.licenses/npm/@actions/cache.dep.yml
generated
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
name: "@actions/cache"
|
name: "@actions/cache"
|
||||||
version: 3.1.1
|
version: 3.1.2
|
||||||
type: npm
|
type: npm
|
||||||
summary:
|
summary:
|
||||||
homepage:
|
homepage:
|
||||||
|
|
|
@ -17,7 +17,8 @@ async function restoreImpl(
|
||||||
// Validate inputs, this can cause task failure
|
// Validate inputs, this can cause task failure
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
utils.logWarning(
|
utils.logWarning(
|
||||||
`Event Validation Error: The event type ${process.env[Events.Key]
|
`Event Validation Error: The event type ${
|
||||||
|
process.env[Events.Key]
|
||||||
} is not supported because it's not tied to a branch or tag ref.`
|
} is not supported because it's not tied to a branch or tag ref.`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
@ -30,7 +31,9 @@ async function restoreImpl(
|
||||||
const cachePaths = utils.getInputAsArray(Inputs.Path, {
|
const cachePaths = utils.getInputAsArray(Inputs.Path, {
|
||||||
required: true
|
required: true
|
||||||
});
|
});
|
||||||
const enableCrossOsArchive = utils.getInputAsBool(Inputs.EnableCrossOsArchive);
|
const enableCrossOsArchive = utils.getInputAsBool(
|
||||||
|
Inputs.EnableCrossOsArchive
|
||||||
|
);
|
||||||
|
|
||||||
const cacheKey = await cache.restoreCache(
|
const cacheKey = await cache.restoreCache(
|
||||||
cachePaths,
|
cachePaths,
|
||||||
|
|
|
@ -19,7 +19,8 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
|
||||||
|
|
||||||
if (!utils.isValidEvent()) {
|
if (!utils.isValidEvent()) {
|
||||||
utils.logWarning(
|
utils.logWarning(
|
||||||
`Event Validation Error: The event type ${process.env[Events.Key]
|
`Event Validation Error: The event type ${
|
||||||
|
process.env[Events.Key]
|
||||||
} is not supported because it's not tied to a branch or tag ref.`
|
} is not supported because it's not tied to a branch or tag ref.`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
@ -51,7 +52,9 @@ async function saveImpl(stateProvider: IStateProvider): Promise<number | void> {
|
||||||
required: true
|
required: true
|
||||||
});
|
});
|
||||||
|
|
||||||
const enableCrossOsArchive = utils.getInputAsBool(Inputs.EnableCrossOsArchive);
|
const enableCrossOsArchive = utils.getInputAsBool(
|
||||||
|
Inputs.EnableCrossOsArchive
|
||||||
|
);
|
||||||
|
|
||||||
cacheId = await cache.saveCache(
|
cacheId = await cache.saveCache(
|
||||||
cachePaths,
|
cachePaths,
|
||||||
|
|
Loading…
Reference in a new issue