diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index f60b5ce..df81a54 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -43,14 +43,12 @@ jobs: if : ${{ fromJSON(matrix.juju) > 3 }} run: | tox -e tests -- -k "not k8s" - juju status exit $? - name: Run 2.9 Tests if : ${{ fromJSON(matrix.juju) < 3 }} run: | tox -e 2.9-tests -- -k "not k8s" - juju status exit $? test-microk8s-strict: diff --git a/dist/bootstrap/index.js b/dist/bootstrap/index.js index 293f145..5715870 100644 --- a/dist/bootstrap/index.js +++ b/dist/bootstrap/index.js @@ -5563,6 +5563,15 @@ const _retryable_exec = (command, initial = 10, maxTry = 5) => { }; const snap = _retryable_exec("snap"); const apt_get = _retryable_exec("apt-get"); +function snap_install(name, channel = "", classic = true) { + return __awaiter(this, void 0, void 0, function* () { + var args = new Array("install", name, `--channel=${channel}`); + if (classic) { + args.push("--classic"); + } + yield snap(args.join(" ")); + }); +} function run() { return __awaiter(this, void 0, void 0, function* () { const HOME = process.env["HOME"]; @@ -5613,7 +5622,7 @@ function run() { yield exec.exec("sudo --preserve-env=http_proxy,https_proxy,no_proxy pip3 install tox"); core.endGroup(); core.startGroup("Install Juju"); - yield snap(`install juju --classic --channel=${juju_channel}`); + yield snap_install("juju", juju_channel, juju_channel.includes("2.9")); core.endGroup(); core.startGroup("Install tools"); yield snap("install jq"); diff --git a/src/bootstrap/index.ts b/src/bootstrap/index.ts index d24536f..086286c 100644 --- a/src/bootstrap/index.ts +++ b/src/bootstrap/index.ts @@ -129,7 +129,11 @@ const _retryable_exec = (command: string, initial: number = 10, maxTry: number = const snap = _retryable_exec("snap"); const apt_get = _retryable_exec("apt-get"); - +async function snap_install(name: string, channel: string="", classic: boolean=true) { + var args = new Array("install", name, `--channel=${channel}`); + if (classic) {args.push("--classic")} + await snap(args.join(" ")) +} async function run() { const HOME = process.env["HOME"] @@ -181,7 +185,7 @@ async function run() { await exec.exec("sudo --preserve-env=http_proxy,https_proxy,no_proxy pip3 install tox"); core.endGroup(); core.startGroup("Install Juju"); - await snap(`install juju --classic --channel=${juju_channel}`); + await snap_install("juju", juju_channel, juju_channel.includes("2.9")); core.endGroup(); core.startGroup("Install tools"); await snap("install jq");