Add a selftest and support for .cargo/bin
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import * as cache from "@actions/cache";
|
||||
import * as core from "@actions/core";
|
||||
import { cleanTarget, getCacheConfig, getPackages, stateKey } from "./common";
|
||||
import { cleanTarget, getCacheConfig, getCargoBins, getPackages, stateBins, stateKey } from "./common";
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
@@ -8,6 +8,9 @@ async function run() {
|
||||
|
||||
const { paths, key, restoreKeys } = await getCacheConfig();
|
||||
|
||||
const bins = await getCargoBins();
|
||||
core.saveState(stateBins, JSON.stringify([...bins]));
|
||||
|
||||
core.info(`Restoring paths:\n ${paths.join("\n ")}`);
|
||||
core.info(`In directory:\n ${process.cwd()}`);
|
||||
core.info(`Using keys:\n ${[key, ...restoreKeys].join("\n ")}`);
|
||||
|
||||
Reference in New Issue
Block a user