forked from MetaMask/metamask-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-e2e-smoke-tests-android-flask.yml
More file actions
97 lines (86 loc) · 3.33 KB
/
run-e2e-smoke-tests-android-flask.yml
File metadata and controls
97 lines (86 loc) · 3.33 KB
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
89
90
91
92
93
94
95
96
97
name: Android Flask E2E Smoke Tests
on:
pull_request:
types: [labeled, opened, synchronize]
schedule:
# Run the full suite every 3 hours
# This helps to identy the flaky and failed tests on main branch
- cron: '0 */3 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !(contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/stable')) }}
jobs:
needs_e2e_build:
name: 'Detect Mobile Build Changes'
# Execution rules:
# - schedule: always run
# - merge_group: never run
# - pull_request: run only if PR has 'run-android-flask-e2e-smoke' label
if: ${{ github.event_name != 'merge_group' && (github.event_name == 'schedule' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-android-flask-e2e-smoke') && github.event.pull_request.merged == false)) }}
uses: ./.github/workflows/needs-e2e-build.yml
build-android-flask-apps:
name: 'Build Android Flask Apps'
# Execution rules:
# - schedule: always run
# - merge_group: never run
# - pull_request: run only if PR has 'run-android-flask-e2e-smoke' label AND android_changed == 'true'
if: ${{ github.event_name != 'merge_group' && ( github.event_name == 'schedule' || ( github.event_name == 'pull_request' && needs.needs_e2e_build.outputs.android_changed == 'true' && contains(github.event.pull_request.labels.*.name, 'run-android-flask-e2e-smoke') ) ) }}
permissions:
contents: read
id-token: write
needs: [needs_e2e_build]
uses: ./.github/workflows/build-android-e2e.yml
with:
build_type: 'flask'
metamask_environment: 'e2e'
keystore_target: 'flask'
secrets: inherit
flask-android-smoke:
strategy:
matrix:
split: [1, 2, 3]
fail-fast: false
needs: [build-android-flask-apps]
uses: ./.github/workflows/run-e2e-workflow.yml
with:
test-suite-name: flask-android-smoke-${{ matrix.split }}
platform: android
test_suite_tag: 'FlaskBuildTests'
split_number: ${{ matrix.split }}
total_splits: 3
build_type: 'flask'
metamask_environment: 'e2e'
secrets: inherit
report-android-smoke-tests:
name: Report Android Smoke Tests
runs-on: ubuntu-latest
if: ${{ !cancelled() && needs.flask-android-smoke.result != 'skipped' }}
needs:
- flask-android-smoke
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Download shards test artifacts (XMLs + Screenshots)
uses: actions/download-artifact@v4
continue-on-error: true
with:
path: all-test-artifacts/
pattern: 'test-e2e-*-android-*'
- name: Post Test Report
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3
with:
name: 'Android Flask E2E Smoke Test Results'
path: 'all-test-artifacts/**/junit.xml'
reporter: 'jest-junit'
fail-on-error: false
list-suites: 'failed'
list-tests: 'failed'
- name: Upload all test artifacts (XMLs + Screenshots)
uses: actions/upload-artifact@v4
with:
name: e2e-smoke-android-all-test-artifacts
path: all-test-artifacts/