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:
parent
83aad8d470
commit
b495963495
12 changed files with 1897 additions and 69 deletions
|
|
@ -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 ")}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue