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
This commit is contained in:
Mateusz Franik
2024-12-30 10:39:28 +01:00
committed by GitHub
parent 2a38bf2961
commit 85770ea6f1
11 changed files with 454 additions and 128 deletions

View File

@@ -271,7 +271,7 @@ jobs:
xcode-version: '15.4'
- name: install dependencies
run: |
brew install ccache unbound boost@1.76 zmq autoconf automake libtool && brew link boost@1.76
brew install ccache unbound zmq autoconf automake libtool
- name: Patch sources
run: |
git config --global --add safe.directory '*'
@@ -404,7 +404,8 @@ jobs:
cd impls/monero.ts
deno run --unstable-ffi --allow-ffi checksum.ts
regression_check:
regression_tests_linux:
name: linux regression tests
strategy:
fail-fast: false
matrix:
@@ -431,7 +432,35 @@ jobs:
- name: Run regression tests
run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts
integration_check:
regression_tests_macos:
name: macos regression tests
strategy:
matrix:
coin: [monero, wownero]
needs: [
lib_macos
]
runs-on: macos-14
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: canary
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/download-artifact@v4
with:
name: macos ${{ matrix.coin }}
path: release/${{ matrix.coin }}
- name: Run regression tests
run: COIN="${{ matrix.coin }}" deno test -A tests/regression.test.ts
integration_tests_linux:
name: linux integration tests
strategy:
matrix:
coin: [monero, wownero]
@@ -462,6 +491,38 @@ jobs:
SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}
integration_tests_macos:
name: macos integration tests
strategy:
matrix:
coin: [monero, wownero]
needs: [
lib_macos
]
runs-on: macos-14
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/download-artifact@v4
with:
name: macos ${{ matrix.coin }}
path: release/${{ matrix.coin }}
- name: Run integration tests
run: COIN="${{ matrix.coin }}" deno test -A tests/integration.test.ts
env:
SECRET_WALLET_PASSWORD: ${{ secrets.SECRET_WALLET_PASSWORD }}
SECRET_WALLET_MNEMONIC: ${{ secrets.SECRET_WALLET_MNEMONIC }}
SECRET_WALLET_RESTORE_HEIGHT: ${{ secrets.SECRET_WALLET_RESTORE_HEIGHT }}
comment_pr:
name: comment on pr
runs-on: ubuntu-latest