mirror of https://github.com/actions/setup-node
Merge pull request #310 from actions/revert-308-v-alsvir/disable-cache-usage-temp-v2
Revert "Temporarily disabled cache usage for v2"
This commit is contained in:
commit
4d0182af5e
|
@ -171,8 +171,7 @@ describe('setup-node', () => {
|
||||||
// Found in cache tests
|
// Found in cache tests
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('finds version in cache with stable true', async () => {
|
||||||
xit('finds version in cache with stable true', async () => {
|
|
||||||
inputs['node-version'] = '12';
|
inputs['node-version'] = '12';
|
||||||
inputs.stable = 'true';
|
inputs.stable = 'true';
|
||||||
|
|
||||||
|
@ -183,8 +182,7 @@ describe('setup-node', () => {
|
||||||
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('finds version in cache with stable not supplied', async () => {
|
||||||
xit('finds version in cache with stable not supplied', async () => {
|
|
||||||
inputs['node-version'] = '12';
|
inputs['node-version'] = '12';
|
||||||
|
|
||||||
inSpy.mockImplementation(name => inputs[name]);
|
inSpy.mockImplementation(name => inputs[name]);
|
||||||
|
@ -196,8 +194,7 @@ describe('setup-node', () => {
|
||||||
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('finds version in cache and adds it to the path', async () => {
|
||||||
xit('finds version in cache and adds it to the path', async () => {
|
|
||||||
inputs['node-version'] = '12';
|
inputs['node-version'] = '12';
|
||||||
|
|
||||||
inSpy.mockImplementation(name => inputs[name]);
|
inSpy.mockImplementation(name => inputs[name]);
|
||||||
|
@ -387,8 +384,7 @@ describe('setup-node', () => {
|
||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
describe('check-latest flag', () => {
|
describe('check-latest flag', () => {
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('use local version and dont check manifest if check-latest is not specified', async () => {
|
||||||
xit('use local version and dont check manifest if check-latest is not specified', async () => {
|
|
||||||
os.platform = 'linux';
|
os.platform = 'linux';
|
||||||
os.arch = 'x64';
|
os.arch = 'x64';
|
||||||
|
|
||||||
|
@ -409,8 +405,7 @@ describe('setup-node', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('check latest version and resolve it from local cache', async () => {
|
||||||
xit('check latest version and resolve it from local cache', async () => {
|
|
||||||
os.platform = 'linux';
|
os.platform = 'linux';
|
||||||
os.arch = 'x64';
|
os.arch = 'x64';
|
||||||
|
|
||||||
|
@ -561,8 +556,7 @@ describe('setup-node', () => {
|
||||||
inputs.stable = 'true';
|
inputs.stable = 'true';
|
||||||
});
|
});
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('find latest LTS version and resolve it from local cache (lts/erbium)', async () => {
|
||||||
xit('find latest LTS version and resolve it from local cache (lts/erbium)', async () => {
|
|
||||||
// arrange
|
// arrange
|
||||||
inputs['node-version'] = 'lts/erbium';
|
inputs['node-version'] = 'lts/erbium';
|
||||||
|
|
||||||
|
@ -632,8 +626,7 @@ describe('setup-node', () => {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
it('find latest LTS version and resolve it from local cache (lts/*)', async () => {
|
||||||
xit('find latest LTS version and resolve it from local cache (lts/*)', async () => {
|
|
||||||
// arrange
|
// arrange
|
||||||
inputs['node-version'] = 'lts/*';
|
inputs['node-version'] = 'lts/*';
|
||||||
|
|
||||||
|
|
|
@ -65086,8 +65086,9 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
|
||||||
let toolPath;
|
let toolPath;
|
||||||
toolPath = tc.find('node', versionSpec, osArch);
|
toolPath = tc.find('node', versionSpec, osArch);
|
||||||
// If not found in cache, download
|
// If not found in cache, download
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
if (toolPath) {
|
||||||
if (false) {}
|
core.info(`Found in cache @ ${toolPath}`);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Attempting to download ${versionSpec}...`);
|
core.info(`Attempting to download ${versionSpec}...`);
|
||||||
let downloadPath = '';
|
let downloadPath = '';
|
||||||
|
|
|
@ -71,8 +71,7 @@ export async function getNode(
|
||||||
toolPath = tc.find('node', versionSpec, osArch);
|
toolPath = tc.find('node', versionSpec, osArch);
|
||||||
|
|
||||||
// If not found in cache, download
|
// If not found in cache, download
|
||||||
// Usage of pre-cached Node.js versions is temporarily disabled.
|
if (toolPath) {
|
||||||
if (false) {
|
|
||||||
core.info(`Found in cache @ ${toolPath}`);
|
core.info(`Found in cache @ ${toolPath}`);
|
||||||
} else {
|
} else {
|
||||||
core.info(`Attempting to download ${versionSpec}...`);
|
core.info(`Attempting to download ${versionSpec}...`);
|
||||||
|
|
Loading…
Reference in New Issue