|
|
@ -215,7 +215,7 @@ describe('setup-go', () => {
|
|
|
|
findSpy.mockImplementation(() => toolPath);
|
|
|
|
findSpy.mockImplementation(() => toolPath);
|
|
|
|
await main.run();
|
|
|
|
await main.run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Setup go stable version spec 1.13.0`);
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Setup go version spec 1.13.0`);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('evaluates to stable with no input', async () => {
|
|
|
|
it('evaluates to stable with no input', async () => {
|
|
|
@ -227,7 +227,7 @@ describe('setup-go', () => {
|
|
|
|
findSpy.mockImplementation(() => toolPath);
|
|
|
|
findSpy.mockImplementation(() => toolPath);
|
|
|
|
await main.run();
|
|
|
|
await main.run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Setup go stable version spec 1.13.0`);
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Setup go version spec 1.13.0`);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('finds a version of go already in the cache', async () => {
|
|
|
|
it('finds a version of go already in the cache', async () => {
|
|
|
@ -393,7 +393,7 @@ describe('setup-go', () => {
|
|
|
|
await main.run();
|
|
|
|
await main.run();
|
|
|
|
|
|
|
|
|
|
|
|
let expPath = path.join(toolPath, 'bin');
|
|
|
|
let expPath = path.join(toolPath, 'bin');
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Setup go stable version spec 1.12.14');
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Setup go version spec 1.12.14');
|
|
|
|
expect(findSpy).toHaveBeenCalled();
|
|
|
|
expect(findSpy).toHaveBeenCalled();
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Attempting to download 1.12.14...');
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Attempting to download 1.12.14...');
|
|
|
|
expect(dlSpy).toHaveBeenCalled();
|
|
|
|
expect(dlSpy).toHaveBeenCalled();
|
|
|
@ -557,8 +557,8 @@ describe('setup-go', () => {
|
|
|
|
|
|
|
|
|
|
|
|
// 1.13.1 => 1.13.1
|
|
|
|
// 1.13.1 => 1.13.1
|
|
|
|
// 1.13 => 1.13.0
|
|
|
|
// 1.13 => 1.13.0
|
|
|
|
// 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1
|
|
|
|
// 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1
|
|
|
|
// 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1
|
|
|
|
// 1.8.5beta1 => 1.8.5-beta.1, 1.8.5rc1 => 1.8.5-rc.1
|
|
|
|
it('converts prerelease versions', async () => {
|
|
|
|
it('converts prerelease versions', async () => {
|
|
|
|
expect(im.makeSemver('1.10beta1')).toBe('1.10.0-beta.1');
|
|
|
|
expect(im.makeSemver('1.10beta1')).toBe('1.10.0-beta.1');
|
|
|
|
expect(im.makeSemver('1.10rc1')).toBe('1.10.0-rc.1');
|
|
|
|
expect(im.makeSemver('1.10rc1')).toBe('1.10.0-rc.1');
|
|
|
@ -605,7 +605,7 @@ describe('setup-go', () => {
|
|
|
|
|
|
|
|
|
|
|
|
await main.run();
|
|
|
|
await main.run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Setup go stable version spec 1.16');
|
|
|
|
expect(logSpy).toHaveBeenCalledWith('Setup go version spec 1.16');
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -630,7 +630,7 @@ describe('setup-go', () => {
|
|
|
|
await main.run();
|
|
|
|
await main.run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(
|
|
|
|
`Setup go stable version spec ${versionSpec}`
|
|
|
|
`Setup go version spec ${versionSpec}`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(
|
|
|
|
expect(logSpy).toHaveBeenCalledWith(
|
|
|
|
'Attempting to resolve the latest version from the manifest...'
|
|
|
|
'Attempting to resolve the latest version from the manifest...'
|
|
|
|