mirror of
https://github.com/actions/setup-node.git
synced 2025-06-29 14:13:49 +00:00
fix: add arch to cached path
This commit is contained in:
parent
b39b52d121
commit
2c3ea16a59
3 changed files with 11 additions and 3 deletions
|
@ -11,7 +11,11 @@ describe('cache-restore', () => {
|
|||
if (!process.env.RUNNER_OS) {
|
||||
process.env.RUNNER_OS = 'Linux';
|
||||
}
|
||||
if (!process.env.RUNNER_ARCH) {
|
||||
process.env.RUNNER_ARCH = 'X64';
|
||||
}
|
||||
const platform = process.env.RUNNER_OS;
|
||||
const arch = process.env.RUNNER_ARCH;
|
||||
const commonPath = '/some/random/path';
|
||||
const npmCachePath = `${commonPath}/npm`;
|
||||
const pnpmCachePath = `${commonPath}/pnpm`;
|
||||
|
@ -135,7 +139,7 @@ describe('cache-restore', () => {
|
|||
await restoreCache(packageManager, '');
|
||||
expect(hashFilesSpy).toHaveBeenCalled();
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}`
|
||||
`Cache restored from key: node-cache-${platform}-${arch}-${packageManager}-${fileHash}`
|
||||
);
|
||||
expect(infoSpy).not.toHaveBeenCalledWith(
|
||||
`${packageManager} cache is not found`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue