Skip to content

Commit d6e3b55

Browse files
Merge pull request actions#308 from actions/v-alsvir/disable-cache-usage-temp-v2
Temporarily disabled cache usage for v2
2 parents aa759c6 + db716f8 commit d6e3b55

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

.github/workflows/e2e-cache.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ jobs:
101101
node-yarn2-depencies-caching:
102102
name: Test yarn 2 (Node ${{ matrix.node-version}}, ${{ matrix.os }})
103103
runs-on: ${{ matrix.os }}
104+
env:
105+
YARN_ENABLE_IMMUTABLE_INSTALLS: false
104106
strategy:
105107
fail-fast: false
106108
matrix:

__tests__/installer.test.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ describe('setup-node', () => {
171171
// Found in cache tests
172172
//--------------------------------------------------
173173

174-
it('finds version in cache with stable true', async () => {
174+
// Usage of pre-cached Node.js versions is temporarily disabled.
175+
xit('finds version in cache with stable true', async () => {
175176
inputs['node-version'] = '12';
176177
inputs.stable = 'true';
177178

@@ -182,7 +183,8 @@ describe('setup-node', () => {
182183
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
183184
});
184185

185-
it('finds version in cache with stable not supplied', async () => {
186+
// Usage of pre-cached Node.js versions is temporarily disabled.
187+
xit('finds version in cache with stable not supplied', async () => {
186188
inputs['node-version'] = '12';
187189

188190
inSpy.mockImplementation(name => inputs[name]);
@@ -194,7 +196,8 @@ describe('setup-node', () => {
194196
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
195197
});
196198

197-
it('finds version in cache and adds it to the path', async () => {
199+
// Usage of pre-cached Node.js versions is temporarily disabled.
200+
xit('finds version in cache and adds it to the path', async () => {
198201
inputs['node-version'] = '12';
199202

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

386389
describe('check-latest flag', () => {
387-
it('use local version and dont check manifest if check-latest is not specified', async () => {
390+
// Usage of pre-cached Node.js versions is temporarily disabled.
391+
xit('use local version and dont check manifest if check-latest is not specified', async () => {
388392
os.platform = 'linux';
389393
os.arch = 'x64';
390394

@@ -405,7 +409,8 @@ describe('setup-node', () => {
405409
);
406410
});
407411

408-
it('check latest version and resolve it from local cache', async () => {
412+
// Usage of pre-cached Node.js versions is temporarily disabled.
413+
xit('check latest version and resolve it from local cache', async () => {
409414
os.platform = 'linux';
410415
os.arch = 'x64';
411416

@@ -556,7 +561,8 @@ describe('setup-node', () => {
556561
inputs.stable = 'true';
557562
});
558563

559-
it('find latest LTS version and resolve it from local cache (lts/erbium)', async () => {
564+
// Usage of pre-cached Node.js versions is temporarily disabled.
565+
xit('find latest LTS version and resolve it from local cache (lts/erbium)', async () => {
560566
// arrange
561567
inputs['node-version'] = 'lts/erbium';
562568

@@ -626,7 +632,8 @@ describe('setup-node', () => {
626632
);
627633
});
628634

629-
it('find latest LTS version and resolve it from local cache (lts/*)', async () => {
635+
// Usage of pre-cached Node.js versions is temporarily disabled.
636+
xit('find latest LTS version and resolve it from local cache (lts/*)', async () => {
630637
// arrange
631638
inputs['node-version'] = 'lts/*';
632639

dist/setup/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65086,9 +65086,8 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
6508665086
let toolPath;
6508765087
toolPath = tc.find('node', versionSpec, osArch);
6508865088
// If not found in cache, download
65089-
if (toolPath) {
65090-
core.info(`Found in cache @ ${toolPath}`);
65091-
}
65089+
// Usage of pre-cached Node.js versions is temporarily disabled.
65090+
if (false) {}
6509265091
else {
6509365092
core.info(`Attempting to download ${versionSpec}...`);
6509465093
let downloadPath = '';

src/installer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ export async function getNode(
7171
toolPath = tc.find('node', versionSpec, osArch);
7272

7373
// If not found in cache, download
74-
if (toolPath) {
74+
// Usage of pre-cached Node.js versions is temporarily disabled.
75+
if (false) {
7576
core.info(`Found in cache @ ${toolPath}`);
7677
} else {
7778
core.info(`Attempting to download ${versionSpec}...`);

0 commit comments

Comments
 (0)