buildx: cache binary to hosted tool cache and GHA cache backend

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-07-06 09:21:45 +02:00
parent ca519e1aa8
commit ddcd63c92a
4 changed files with 498 additions and 58 deletions

View File

@@ -36,9 +36,8 @@ afterEach(function () {
describe('download', () => {
// prettier-ignore
test.each([
['v0.9.1', false],
['latest', false],
['v0.9.1', true],
['v0.9.0', false],
['v0.10.5', true],
['latest', true]
])(
'acquires %p of buildx (standalone: %p)', async (version, standalone) => {
@@ -56,6 +55,18 @@ describe('download', () => {
100000
);
// prettier-ignore
test.each([
// following versions are already cached to htc from previous test cases
['v0.9.0'],
['v0.10.5'],
])(
'acquires %p of buildx with cache', async (version) => {
const install = new Install({standalone: false});
const toolPath = await install.download(version);
expect(fs.existsSync(toolPath)).toBe(true);
});
// TODO: add tests for arm
// prettier-ignore
test.each([