-
-
Notifications
You must be signed in to change notification settings - Fork 283
88 lines (79 loc) · 2.75 KB
/
test-suite-desktop-e2e-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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
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*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
load-e2e-matrix:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.load-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load e2e Matrix
id: load-matrix
uses: ./.github/actions/load-e2e-matrix
with:
project: "desktop"
run-e2e-suite-desktop-tests:
if: github.repository == 'trezor/trezor-suite'
runs-on: ubuntu-24.04
needs:
- load-e2e-matrix
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.load-e2e-matrix.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check previous runs
id: check-previous-runs
if: github.event_name == 'pull_request' && github.run_attempt == 1
uses: "./.github/actions/check-previous-test-runs"
with:
github_token: ${{ secrets.TREZOR_BOT_TOKEN }}
pr_branch: ${{ github.head_ref }}
pr_created: ${{ github.event.pull_request.created_at }}
repo: ${{ github.repository }}
workflow_name: ${{ github.workflow }}
job_name: "${{ github.job }} (${{ join(matrix.*, ', ') }})"
- name: Setup node
if: steps.check-previous-runs.outputs.skip_tests != 'true'
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: yarn
- name: Build desktop app
if: steps.check-previous-runs.outputs.skip_tests != 'true'
uses: ./.github/actions/build-desktop
- name: Run Playwright E2E Tests
if: steps.check-previous-runs.outputs.skip_tests != 'true'
uses: ./.github/actions/run-e2e-tests
with:
project: "desktop"
containers: ${{ matrix.CONTAINERS }}
test-group: ${{ matrix.TEST_GROUP }}
currents-project-id: "4ytF0E"
currents-record-key: ${{ secrets.CURRENTS_RECORD_KEY }}
e2e-passphrase: ${{ secrets.E2E_TEST_PASSPHRASE }}