Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily disabled cache usage for v2 #308

Merged
merged 3 commits into from Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/e2e-cache.yml
Expand Up @@ -101,6 +101,8 @@ jobs:
node-yarn2-depencies-caching:
name: Test yarn 2 (Node ${{ matrix.node-version}}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
strategy:
fail-fast: false
matrix:
Expand Down
21 changes: 14 additions & 7 deletions __tests__/installer.test.ts
Expand Up @@ -171,7 +171,8 @@ describe('setup-node', () => {
// 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.stable = 'true';

Expand All @@ -182,7 +183,8 @@ describe('setup-node', () => {
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';

inSpy.mockImplementation(name => inputs[name]);
Expand All @@ -194,7 +196,8 @@ describe('setup-node', () => {
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';

inSpy.mockImplementation(name => inputs[name]);
Expand Down Expand Up @@ -384,7 +387,8 @@ describe('setup-node', () => {
}, 100000);

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.arch = 'x64';

Expand All @@ -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.arch = 'x64';

Expand Down Expand Up @@ -556,7 +561,8 @@ describe('setup-node', () => {
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
inputs['node-version'] = 'lts/erbium';

Expand Down Expand Up @@ -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
inputs['node-version'] = 'lts/*';

Expand Down
5 changes: 2 additions & 3 deletions dist/setup/index.js
Expand Up @@ -65086,9 +65086,8 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
let toolPath;
toolPath = tc.find('node', versionSpec, osArch);
// If not found in cache, download
if (toolPath) {
core.info(`Found in cache @ ${toolPath}`);
}
// Usage of pre-cached Node.js versions is temporarily disabled.
if (false) {}
else {
core.info(`Attempting to download ${versionSpec}...`);
let downloadPath = '';
Expand Down
3 changes: 2 additions & 1 deletion src/installer.ts
Expand Up @@ -71,7 +71,8 @@ export async function getNode(
toolPath = tc.find('node', versionSpec, osArch);

// 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}`);
} else {
core.info(`Attempting to download ${versionSpec}...`);
Expand Down