mirror of
https://github.com/actions/setup-node.git
synced 2025-06-29 06:03:50 +00:00
Revert "fix: add arch to cached path (#843)"
This reverts commit 39370e3970
.
This commit is contained in:
parent
39370e3970
commit
1249eb6de4
3 changed files with 3 additions and 14 deletions
|
@ -2,7 +2,6 @@ import * as core from '@actions/core';
|
|||
import * as cache from '@actions/cache';
|
||||
import * as path from 'path';
|
||||
import * as glob from '@actions/glob';
|
||||
import osm from 'os';
|
||||
|
||||
import * as utils from '../src/cache-utils';
|
||||
import {restoreCache} from '../src/cache-restore';
|
||||
|
@ -13,7 +12,6 @@ describe('cache-restore', () => {
|
|||
process.env.RUNNER_OS = 'Linux';
|
||||
}
|
||||
const platform = process.env.RUNNER_OS;
|
||||
const arch = 'arm64';
|
||||
const commonPath = '/some/random/path';
|
||||
const npmCachePath = `${commonPath}/npm`;
|
||||
const pnpmCachePath = `${commonPath}/pnpm`;
|
||||
|
@ -54,7 +52,6 @@ describe('cache-restore', () => {
|
|||
let getCommandOutputSpy: jest.SpyInstance;
|
||||
let restoreCacheSpy: jest.SpyInstance;
|
||||
let hashFilesSpy: jest.SpyInstance;
|
||||
let archSpy: jest.SpyInstance;
|
||||
|
||||
beforeEach(() => {
|
||||
// core
|
||||
|
@ -105,10 +102,6 @@ describe('cache-restore', () => {
|
|||
|
||||
// cache-utils
|
||||
getCommandOutputSpy = jest.spyOn(utils, 'getCommandOutput');
|
||||
|
||||
// os
|
||||
archSpy = jest.spyOn(osm, 'arch');
|
||||
archSpy.mockImplementation(() => arch);
|
||||
});
|
||||
|
||||
describe('Validate provided package manager', () => {
|
||||
|
@ -142,7 +135,7 @@ describe('cache-restore', () => {
|
|||
await restoreCache(packageManager, '');
|
||||
expect(hashFilesSpy).toHaveBeenCalled();
|
||||
expect(infoSpy).toHaveBeenCalledWith(
|
||||
`Cache restored from key: node-cache-${platform}-${arch}-${packageManager}-${fileHash}`
|
||||
`Cache restored from key: node-cache-${platform}-${packageManager}-${fileHash}`
|
||||
);
|
||||
expect(infoSpy).not.toHaveBeenCalledWith(
|
||||
`${packageManager} cache is not found`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue