Skip to content

testing desktop tests in gha #12

testing desktop tests in gha

testing desktop tests in gha #12

name: "[Build/Test] suite-desktop e2e"
# this action builds a desktop version of Suite and runs basic test suite for it
# run only if there are changes in suite or related libs paths
on:
pull_request:
types: [labeled]
branches:
- develop
paths-ignore:
- "suite-native/**"
- "packages/connect*/**"
- "packages/react-native-usb/**"
# ignore unrelated github workflows config files
- ".github/workflows/connect*"
- ".github/workflows/suite-native*"
- ".github/workflows/build-desktop*"
- ".github/workflows/release*"
- ".github/workflows/template*"
jobs:
run-desktop-tests:
if: github.repository == 'trezor/trezor-suite' && github.event.label.name == 'aaa_desktop_e2e'
runs-on: ubuntu-latest
env:
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
strategy:
fail-fast: false
matrix:
include:
- TEST_FILE: ["spawn-tor", "spawn-bridge", "suite-guide", "wallet-discovery"]
CONTAINERS: "trezor-user-env-unix"
- TEST_FILE: ["electrum"]
CONTAINERS: "trezor-user-env-unix electrum-regtest"
# commented out. coinjoin test is not adapted to current state of this feature
# - TEST_FILE: ["coinjoin"]
# CONTAINERS: "trezor-user-env-unix coinjoin-backend"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install deps and build libs
run: |
yarn install --immutable
yarn message-system-sign-config
yarn workspace @trezor/suite-data build:lib
yarn workspace @trezor/connect-iframe build:lib
yarn workspace @trezor/transport-bridge build:lib
- name: Build linux suite-desktop
run: |
yarn workspace @trezor/suite-desktop build:linux
bash packages/suite-desktop-core/scripts/gnupg-sign.sh
mv packages/suite-desktop/build-electron/* .
- name: Pull and run Docker containers
run: |
docker-compose pull
docker-compose up -d ${{ matrix.CONTAINERS }}
- name: Run tests
run: docker-compose run test-run
- name: Cleanup
run: |
docker-compose down
docker network prune -f