Skip to content

Feat/22838 asset picker input in trading (swap & buy) #13640

Feat/22838 asset picker input in trading (swap & buy)

Feat/22838 asset picker input in trading (swap & buy) #13640

name: "[Test] PR Suite Desktop e2e tests"
# Executed as part of PR checks
# Builds the desktop app
# Runs full e2e test suite for Suite Desktop
permissions:
id-token: write # for fetching the OIDC token
contents: read # for actions/checkout
pull-requests: write # for posting comments
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*"
- "**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
check-previous-runs:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-latest
outputs:
skip_tests: ${{ steps.check-previous-runs.outputs.skip_tests }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate GitHub App token
id: trezor-bot-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TREZOR_BOT_APP_ID }}
private-key: ${{ secrets.TREZOR_BOT_PRIVATE_KEY }}
- name: Check previous runs
id: check-previous-runs
uses: "./.github/actions/check-previous-test-runs"
with:
github_token: ${{ steps.trezor-bot-token.outputs.token }}
pr_branch: ${{ github.head_ref }}
pr_created: ${{ github.event.pull_request.created_at }}
repo: ${{ github.repository }}
workflow_name: ${{ github.workflow }}
run_attempt: ${{ github.run_attempt }}
build-app:
needs:
- check-previous-runs
if: github.repository == 'trezor/trezor-suite' && needs.check-previous-runs.outputs.skip_tests != 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Upload Suite Desktop
uses: ./.github/actions/build-desktop
post-currents-link:
if: github.repository == 'trezor/trezor-suite' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs:
- build-app
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate GitHub App token
id: trezor-bot-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TREZOR_BOT_APP_ID }}
private-key: ${{ secrets.TREZOR_BOT_PRIVATE_KEY }}
- name: Post Currents link
uses: ./.github/actions/post-currents-link
with:
github_token: ${{ steps.trezor-bot-token.outputs.token }}
project: "desktop"
currents-project-id: "4ytF0E"
run-e2e-suite-desktop-tests:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-24.04
needs:
- build-app
- check-previous-runs
strategy:
fail-fast: false
matrix:
TEST_GROUP: [1, 2, 3, 4, 5, 6]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: desktop-app-build-e2e
- name: Extract build artifact
run: tar -xzf app-build.tar.gz -C ${{ github.workspace }}/packages/suite-desktop
- name: Run Playwright E2E Tests
uses: ./.github/actions/run-e2e-tests
with:
project: "desktop"
containers: "trezor-user-env-unix bitcoin-regtest electrum-regtest"
workspace-dependencies: "@trezor/suite-desktop"
test-group: ${{ matrix.TEST_GROUP }}
additional-grep-invert: "@nightlyOnly"
fail-fast: 7
currents-project-id: "4ytF0E"
currents-record-key: ${{ secrets.CURRENTS_RECORD_KEY }}
e2e-passphrase: ${{ secrets.E2E_TEST_PASSPHRASE }}
run-e2e-suite-desktop-tests-t3w1:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-24.04
needs:
- build-app
- check-previous-runs
strategy:
fail-fast: false
matrix:
TEST_GROUP: [1, 2, 3, 4, 5, 6]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
ref: ${{ github.sha }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: desktop-app-build-e2e
- name: Extract build artifact
run: tar -xzf app-build.tar.gz -C ${{ github.workspace }}/packages/suite-desktop
- name: Run Playwright E2E Tests
uses: ./.github/actions/run-e2e-tests
env:
EMULATOR_MODEL: T3W1
with:
project: "desktop"
containers: "trezor-user-env-unix bitcoin-regtest electrum-regtest"
workspace-dependencies: "@trezor/suite-desktop"
test-group: ${{ matrix.TEST_GROUP }}
additional-grep-invert: "@specificModel|@nightlyOnly"
fail-fast: 7
currents-project-id: "4ytF0E"
currents-record-key: ${{ secrets.CURRENTS_RECORD_KEY }}
currents-ci-build-id: "pr-run-t3w1-${{ github.run_id }}-${{ github.run_attempt }}"
currents-tags: "T3W1"
e2e-passphrase: ${{ secrets.E2E_TEST_PASSPHRASE }}