Skip to content

chore(connect): default to nversion=1 again #7376

chore(connect): default to nversion=1 again

chore(connect): default to nversion=1 again #7376

name: "[Test] suite-desktop e2e"
# this workflow builds a desktop version of Suite and runs basic test suite for it
on:
pull_request:
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*"
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
run-desktop-tests:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- TEST_FILE: "spawn-bridge spawn-bridge-daemon suite-guide wallet-discovery"
CONTAINERS: "trezor-user-env-unix"
- TEST_FILE: "electrum"
CONTAINERS: "trezor-user-env-unix electrum-regtest"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run and store git values for Currents
run: |
echo "COMMIT_MESSAGE=$(git show -s --pretty=%s)" >> $GITHUB_ENV
echo "COMMIT_EMAIL=$(git show -s --pretty=%ae)" >> $GITHUB_ENV
echo "COMMIT_AUTHOR=$(git show -s --pretty=%an)" >> $GITHUB_ENV
echo "COMMIT_SHA=$(git show -s --pretty=%H)" >> $GITHUB_ENV
echo "COMMIT_TIMESTAMP=$(git show -s --pretty=%ct)" >> $GITHUB_ENV
- 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/transport-bridge build:lib
- name: Build app.js for tests
run: |
yarn workspace @trezor/suite-desktop build:app
yarn workspace @trezor/suite-desktop build:ui
- name: Run e2e desktop tests
env:
GITHUB_WORKFLOW: ${{github.workflow}}
GITHUB_ACTION: true
GITHUB_EVENT_NAME: ${{github.event_name}}
GITHUB_RUN_ID: ${{github.run_id}}
GITHUB_RUN_ATTEMPT: ${{github.run_attempt}}
GITHUB_REPOSITORY: ${{github.repository}}
COMMIT_INFO_BRANCH: ${{github.head_ref}}
COMMIT_INFO_MESSAGE: ${{env.COMMIT_MESSAGE}}
COMMIT_INFO_EMAIL: ${{env.COMMIT_EMAIL}}
COMMIT_INFO_AUTHOR: ${{env.COMMIT_AUTHOR}}
COMMIT_INFO_SHA: ${{env.COMMIT_SHA}}
COMMIT_INFO_TIMESTAMP: ${{env.COMMIT_TIMESTAMP}}
COMMIT_INFO_REMOTE: ${{github.repository}}
CURRENTS_PROJECT_ID: 4ytF0E
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
CURRENTS_CI_BUILD_ID: pr-run-${{github.run_id}}
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
TEST_FILE: ${{ matrix.TEST_FILE }}
run: |
docker compose pull
docker compose up -d ${{ matrix.CONTAINERS }}
yarn workspace @trezor/suite-desktop-core test:e2e ${{ env.TEST_FILE }}
- name: cleanup
env:
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
run: docker compose down
# TODO: currently only uploads trace.zip, figure out why screens are not uploaded
- name: Upload artifacts
if: ${{ ! cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-artifacts-${{ matrix.TEST_FILE }}
path: |
./packages/suite-desktop-core/e2e/test-results