From 85770ea6f1dab106754675f40e1334e575e03646 Mon Sep 17 00:00:00 2001 From: Mateusz Franik <47059999+Im-Beast@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:39:28 +0100 Subject: tests: run integration and regression tests on other platforms (#93) * tests: add script to download test dependencies from fallback mirrors * tests: use the new download_deps script, run tests on macos * ci: download proper artifact for macos * chore: make download_deps script download everything to dir named `monero_c` when ran directly * tests: await downloading deps * tests download proper monero_c version in prepareMoneroC * tests: fix typos * tests: add file data for more targets * tests: print why retrieving tags failed * chore: change mirror url endpoint from `monero_c` to `download_mirror` * tests: use cached releases endpoint to prevent ratelimits * ci: remove brew@1.76 dependency * tests: fix macos dylib path * feat!(monero.ts): make `createTransactionMultDest` optionally return `null` * feat(monero.ts): make `Wallet_reconnectDevice` symbol optional * tests: don't try to extract file if out already exists * tests: remove unnecesary directory rm calls * ci: set regression tests to use canary --- tests/regression.test.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/regression.test.ts') diff --git a/tests/regression.test.ts b/tests/regression.test.ts index 82a9f95..797720f 100755 --- a/tests/regression.test.ts +++ b/tests/regression.test.ts @@ -1,4 +1,4 @@ -import { $, createWalletViaCli, downloadCli, getMoneroC, getMoneroCTags } from "./utils.ts"; +import { $, createWalletViaCli, getMoneroCTags, prepareCli, prepareMoneroC } from "./utils.ts"; const coin = Deno.env.get("COIN"); if (coin !== "monero" && coin !== "wownero") { @@ -11,7 +11,7 @@ Deno.test(`Regression tests (${coin})`, async (t) => { const tags = await getMoneroCTags(); const latestTag = tags[0]; - await Promise.all([getMoneroC(coin, "next"), await getMoneroC(coin, latestTag), downloadCli(coin)]); + await Promise.all([prepareMoneroC(coin, "next"), await prepareMoneroC(coin, latestTag), prepareCli(coin)]); await t.step("Simple (next, latest, next)", async () => { const walletInfo = await createWalletViaCli(coin, "dog", "sobaka"); @@ -27,13 +27,10 @@ Deno.test(`Regression tests (${coin})`, async (t) => { const walletInfo = await createWalletViaCli(coin, "cat", "koshka"); for (const version of tags.toReversed()) { - if (version !== "next" && version !== tags[0]) await getMoneroC(coin, version); + if (version !== "next" && version !== tags[0]) await prepareMoneroC(coin, version); await $`deno run -A ./tests/compare.ts ${coin} ${version} ${JSON.stringify(walletInfo)}`; } - - await Deno.remove("./tests/wallets", { recursive: true }).catch(() => {}); }); await Deno.remove("./tests/wallets", { recursive: true }).catch(() => {}); - await Deno.remove("./tests/libs", { recursive: true }).catch(() => {}); }); -- cgit v1.2.3