mirror of
https://github.com/actions/setup-node.git
synced 2024-11-13 18:58:04 +00:00
Merge pull request #308 from actions/v-alsvir/disable-cache-usage-temp-v2
Temporarily disabled cache usage for v2
This commit is contained in:
commit
d6e3b5539e
2
.github/workflows/e2e-cache.yml
vendored
2
.github/workflows/e2e-cache.yml
vendored
@ -101,6 +101,8 @@ jobs:
|
|||||||
node-yarn2-depencies-caching:
|
node-yarn2-depencies-caching:
|
||||||
name: Test yarn 2 (Node ${{ matrix.node-version}}, ${{ matrix.os }})
|
name: Test yarn 2 (Node ${{ matrix.node-version}}, ${{ matrix.os }})
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
env:
|
||||||
|
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -171,7 +171,8 @@ describe('setup-node', () => {
|
|||||||
// Found in cache tests
|
// Found in cache tests
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
it('finds version in cache with stable true', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
xit('finds version in cache with stable true', async () => {
|
||||||
inputs['node-version'] = '12';
|
inputs['node-version'] = '12';
|
||||||
inputs.stable = 'true';
|
inputs.stable = 'true';
|
||||||
|
|
||||||
@ -182,7 +183,8 @@ describe('setup-node', () => {
|
|||||||
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('finds version in cache with stable not supplied', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
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]);
|
||||||
@ -194,7 +196,8 @@ describe('setup-node', () => {
|
|||||||
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('finds version in cache and adds it to the path', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
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]);
|
||||||
@ -384,7 +387,8 @@ describe('setup-node', () => {
|
|||||||
}, 100000);
|
}, 100000);
|
||||||
|
|
||||||
describe('check-latest flag', () => {
|
describe('check-latest flag', () => {
|
||||||
it('use local version and dont check manifest if check-latest is not specified', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
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';
|
||||||
|
|
||||||
@ -405,7 +409,8 @@ describe('setup-node', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('check latest version and resolve it from local cache', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
xit('check latest version and resolve it from local cache', async () => {
|
||||||
os.platform = 'linux';
|
os.platform = 'linux';
|
||||||
os.arch = 'x64';
|
os.arch = 'x64';
|
||||||
|
|
||||||
@ -556,7 +561,8 @@ describe('setup-node', () => {
|
|||||||
inputs.stable = 'true';
|
inputs.stable = 'true';
|
||||||
});
|
});
|
||||||
|
|
||||||
it('find latest LTS version and resolve it from local cache (lts/erbium)', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
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';
|
||||||
|
|
||||||
@ -626,7 +632,8 @@ describe('setup-node', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('find latest LTS version and resolve it from local cache (lts/*)', async () => {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
xit('find latest LTS version and resolve it from local cache (lts/*)', async () => {
|
||||||
// arrange
|
// arrange
|
||||||
inputs['node-version'] = 'lts/*';
|
inputs['node-version'] = 'lts/*';
|
||||||
|
|
||||||
|
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
@ -65086,9 +65086,8 @@ 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
|
||||||
if (toolPath) {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
core.info(`Found in cache @ ${toolPath}`);
|
if (false) {}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
core.info(`Attempting to download ${versionSpec}...`);
|
core.info(`Attempting to download ${versionSpec}...`);
|
||||||
let downloadPath = '';
|
let downloadPath = '';
|
||||||
|
@ -71,7 +71,8 @@ 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
|
||||||
if (toolPath) {
|
// Usage of pre-cached Node.js versions is temporarily disabled.
|
||||||
|
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
Block a user