mirror of
https://github.com/docker/setup-buildx-action.git
synced 2025-07-01 05:14:15 +00:00
Allow to download staging releases of buildx
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
a1c666d855
commit
3b5c478cc4
10 changed files with 8527 additions and 40 deletions
|
@ -72,15 +72,15 @@ describe('inspect', () => {
|
|||
);
|
||||
});
|
||||
|
||||
describe('install', () => {
|
||||
describe('downloadRelease', () => {
|
||||
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'setup-buildx-'));
|
||||
it('acquires v0.4.1 version of buildx', async () => {
|
||||
const buildxBin = await buildx.install('v0.4.1', tmpDir);
|
||||
const buildxBin = await buildx.downloadRelease('v0.4.1', tmpDir);
|
||||
console.log(buildxBin);
|
||||
expect(fs.existsSync(buildxBin)).toBe(true);
|
||||
}, 100000);
|
||||
it('acquires latest version of buildx', async () => {
|
||||
const buildxBin = await buildx.install('latest', tmpDir);
|
||||
const buildxBin = await buildx.downloadRelease('latest', tmpDir);
|
||||
console.log(buildxBin);
|
||||
expect(fs.existsSync(buildxBin)).toBe(true);
|
||||
}, 100000);
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import * as context from '../src/context';
|
||||
|
||||
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
|
||||
const tmpDir = path.join('/tmp/.docker-setup-buildx-jest').split(path.sep).join(path.posix.sep);
|
||||
if (!fs.existsSync(tmpDir)) {
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
}
|
||||
return tmpDir;
|
||||
});
|
||||
|
||||
describe('getInputList', () => {
|
||||
it('handles single line correctly', async () => {
|
||||
await setInput('foo', 'bar');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue