3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-01-10 13:49:02 +00:00

Add a selftest and support for .cargo/bin

This commit is contained in:
Arpad Borsos 2021-02-16 08:53:35 +01:00
parent 83aad8d470
commit b495963495
12 changed files with 1897 additions and 69 deletions

View file

@ -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 ")}`);