Skip to content

Feat convert cy pw suite settings t1b1 #8027

Feat convert cy pw suite settings t1b1

Feat convert cy pw suite settings t1b1 #8027

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_GROUP: "@group=suite"
# CONTAINERS: "trezor-user-env-unix"
# - TEST_GROUP: "@group=device-management"
# CONTAINERS: "trezor-user-env-unix"
- TEST_GROUP: "@group=settings"
CONTAINERS: "trezor-user-env-unix electrum-regtest"
# - TEST_GROUP: "@group=metadata"
# CONTAINERS: "trezor-user-env-unix"
# - TEST_GROUP: "@group=passphrase"
# CONTAINERS: "trezor-user-env-unix"
# - TEST_GROUP: "@group=other"
# CONTAINERS: "trezor-user-env-unix"
- TEST_GROUP: "@group=wallet"
CONTAINERS: "trezor-user-env-unix"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Install dependencies, build libs and pull docker images
env:
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
run: |
yarn install --immutable
yarn message-system-sign-config
yarn workspace @trezor/suite-data build:lib
yarn workspace @trezor/transport-bridge build:lib
docker compose pull ${{ matrix.CONTAINERS }}
- name: Build electron app.js for tests
run: |
yarn workspace @trezor/suite-desktop build:app
yarn workspace @trezor/suite-desktop build:ui
- name: Run Playwright e2e desktop tests
env:
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
GITHUB_ACTION: true
CURRENTS_PROJECT_ID: 4ytF0E
CURRENTS_RECORD_KEY: ${{ secrets.CURRENTS_RECORD_KEY }}
CURRENTS_CI_BUILD_ID: pr-run-${{github.run_id}}
run: |
docker compose up -d ${{ matrix.CONTAINERS }}
echo "Starting Playwright Desktop test group ${{ matrix.TEST_GROUP }}"
yarn workspace @trezor/suite-desktop-core test:e2e:desktop --forbid-only --grep=${{ matrix.TEST_GROUP }}
- name: Extract Trezor-user-env logs
if: ${{ ! cancelled() }}
run: |
docker cp docker-trezor-user-env-unix-1:/trezor-user-env/logs/debugging.log trezor-user-env-debugging.log || true
docker cp docker-trezor-user-env-unix-1:/trezor-user-env/logs/emulator_bridge.log tenv-emulator-bridge-debugging.log || true
docker cp docker-trezor-user-env-unix-1:/trezor-user-env/docker/version.txt trezor-user-env-version.txt || true
- name: Upload Trezor-user-env logs
if: ${{ ! cancelled() }}
uses: actions/upload-artifact@v4
with:
name: emulator-logs-${{ matrix.TEST_GROUP }}
path: |
trezor-user-env-debugging.log
tenv-emulator-bridge-debugging.log
trezor-user-env-version.txt
retention-days: 30
- name: Docker compose down
env:
COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
run: docker compose down
- name: Upload Playwright report
if: ${{ ! cancelled() }}
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.TEST_GROUP }}
path: ./packages/suite-desktop-core/playwright-report/
retention-days: 30