Skip to content

Commit b3b51b2

Browse files
authored
ci: split smoke E2E tests between android and iOS platforms (MetaMask#18567)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** Split smoke E2E tests between android and iOS platforms <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 8c5ee9b commit b3b51b2

6 files changed

Lines changed: 293 additions & 287 deletions

File tree

.github/workflows/build-android-e2e.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ on:
1616
description: 'Whether the sourcemap was successfully uploaded'
1717
value: ${{ jobs.build-android-apks.outputs.sourcemap-uploaded }}
1818

19-
concurrency:
20-
group: ${{ github.workflow }}-${{ github.ref }}
21-
cancel-in-progress: ${{ !(contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/stable')) }}
22-
2319
jobs:
2420
build-android-apks:
2521
name: Build Android E2E APKs

.github/workflows/ci.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
merge_group:
77
types: [checks_requested]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ !(contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/stable')) }}
12+
913
jobs:
1014
check-diff:
1115
runs-on: macos-latest
@@ -124,12 +128,6 @@ jobs:
124128
else
125129
echo "No changes detected"
126130
fi
127-
e2e-tests:
128-
permissions:
129-
contents: read
130-
id-token: write
131-
uses: ./.github/workflows/run-e2e.yml
132-
secrets: inherit
133131
merge-unit-tests:
134132
runs-on: ubuntu-latest
135133
needs: unit-tests
@@ -164,6 +162,23 @@ jobs:
164162
echo "No changes detected"
165163
fi
166164
165+
build-android-apks:
166+
name: "Build Android APKs"
167+
if: ${{ github.event_name != 'merge_group' }}
168+
permissions:
169+
contents: read
170+
id-token: write
171+
uses: ./.github/workflows/build-android-e2e.yml
172+
secrets: inherit
173+
174+
e2e-smoke-tests-android:
175+
permissions:
176+
contents: read
177+
id-token: write
178+
needs: [build-android-apks]
179+
uses: ./.github/workflows/run-e2e-smoke-tests-android.yml
180+
secrets: inherit
181+
167182
js-bundle-size-check:
168183
runs-on: ubuntu-latest
169184
steps:
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Android E2E Smoke Tests
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
smoke-confirmations-android:
12+
name: "Confirmations Smoke (Android)"
13+
uses: ./.github/workflows/run-e2e-workflow.yml
14+
with:
15+
test-suite-name: smoke-confirmations-android
16+
platform: android
17+
test_suite_tag: ".*SmokeConfirmations.*"
18+
secrets: inherit
19+
20+
smoke-trade-android:
21+
name: "Trade Smoke (Android)"
22+
uses: ./.github/workflows/run-e2e-workflow.yml
23+
with:
24+
test-suite-name: smoke-trade-android
25+
platform: android
26+
test_suite_tag: ".*SmokeTrade.*"
27+
secrets: inherit
28+
29+
smoke-wallet-platform-android:
30+
name: "Wallet Platform Smoke (Android)"
31+
uses: ./.github/workflows/run-e2e-workflow.yml
32+
with:
33+
test-suite-name: smoke-wallet-platform-android
34+
platform: android
35+
test_suite_tag: ".*SmokeWalletPlatform.*"
36+
secrets: inherit
37+
38+
smoke-identity-android:
39+
name: "Identity Smoke (Android)"
40+
uses: ./.github/workflows/run-e2e-workflow.yml
41+
with:
42+
test-suite-name: smoke-identity-android
43+
platform: android
44+
test_suite_tag: ".*SmokeIdentity.*"
45+
secrets: inherit
46+
47+
smoke-accounts-android:
48+
name: "Accounts Smoke (Android)"
49+
uses: ./.github/workflows/run-e2e-workflow.yml
50+
with:
51+
test-suite-name: smoke-accounts-android
52+
platform: android
53+
test_suite_tag: ".*SmokeAccounts.*"
54+
secrets: inherit
55+
56+
smoke-network-abstraction-android:
57+
name: "Network Abstraction Smoke (Android)"
58+
uses: ./.github/workflows/run-e2e-workflow.yml
59+
with:
60+
test-suite-name: smoke-network-abstraction-android
61+
platform: android
62+
test_suite_tag: ".*SmokeNetworkAbstraction.*"
63+
secrets: inherit
64+
65+
smoke-network-expansion-android:
66+
name: "Network Expansion Smoke (Android)"
67+
uses: ./.github/workflows/run-e2e-workflow.yml
68+
with:
69+
test-suite-name: smoke-network-expansion-android
70+
platform: android
71+
test_suite_tag: ".*NetworkExpansion.*"
72+
secrets: inherit
73+
74+
smoke-performance-android:
75+
name: "Performance Smoke (Android)"
76+
uses: ./.github/workflows/run-e2e-workflow.yml
77+
with:
78+
test-suite-name: smoke-performance-android
79+
platform: android
80+
test_suite_tag: ".*Performance.*"
81+
secrets: inherit
82+
83+
smoke-card-android:
84+
name: "Card Smoke (Android)"
85+
uses: ./.github/workflows/run-e2e-workflow.yml
86+
with:
87+
test-suite-name: smoke-card-android
88+
platform: android
89+
test_suite_tag: ".*SmokeCard.*"
90+
secrets: inherit
91+
92+
report-android-smoke-tests:
93+
name: Report Android Smoke Tests
94+
runs-on: ubuntu-latest
95+
if: always()
96+
needs:
97+
- smoke-confirmations-android
98+
- smoke-trade-android
99+
- smoke-wallet-platform-android
100+
- smoke-identity-android
101+
- smoke-accounts-android
102+
- smoke-network-abstraction-android
103+
- smoke-network-expansion-android
104+
- smoke-performance-android
105+
- smoke-card-android
106+
107+
steps:
108+
- name: Checkout
109+
uses: actions/checkout@v4
110+
111+
- name: Download all test results
112+
uses: actions/download-artifact@v4
113+
with:
114+
path: all-test-results/
115+
pattern: "*-android-test-results"
116+
117+
- name: Post Test Report
118+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3
119+
with:
120+
name: "Android E2E Smoke Test Results"
121+
path: "all-test-results/**/*.xml"
122+
reporter: "jest-junit"
123+
fail-on-error: false
124+
list-suites: "all"
125+
list-tests: "all"
126+
127+
- name: Upload merged report
128+
uses: actions/upload-artifact@v4
129+
with:
130+
name: android-merged-test-report
131+
path: all-test-results/**/*.xml
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
name: iOS E2E Smoke Tests
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
id-token: write
9+
10+
jobs:
11+
smoke-confirmations-ios:
12+
name: "Confirmations Smoke (iOS)"
13+
uses: ./.github/workflows/run-e2e-workflow.yml
14+
with:
15+
test-suite-name: smoke-confirmations-ios
16+
platform: ios
17+
test_suite_tag: ".*SmokeConfirmations.*"
18+
secrets: inherit
19+
20+
smoke-confirmations-redesigned-ios:
21+
name: "Confirmations Redesigned Smoke (iOS)"
22+
uses: ./.github/workflows/run-e2e-workflow.yml
23+
with:
24+
test-suite-name: smoke-confirmations-redesigned-ios
25+
platform: ios
26+
test_suite_tag: ".*SmokeConfirmationsRedesigned.*"
27+
secrets: inherit
28+
29+
smoke-trade-ios:
30+
name: "Trade Smoke (iOS)"
31+
uses: ./.github/workflows/run-e2e-workflow.yml
32+
with:
33+
test-suite-name: smoke-trade-ios
34+
platform: ios
35+
test_suite_tag: ".*SmokeTrade.*"
36+
secrets: inherit
37+
38+
smoke-wallet-platform-ios:
39+
name: "Wallet Platform Smoke (iOS)"
40+
uses: ./.github/workflows/run-e2e-workflow.yml
41+
with:
42+
test-suite-name: smoke-wallet-platform-ios
43+
platform: ios
44+
test_suite_tag: ".*SmokeWalletPlatform.*"
45+
secrets: inherit
46+
47+
smoke-identity-ios:
48+
name: "Identity Smoke (iOS)"
49+
uses: ./.github/workflows/run-e2e-workflow.yml
50+
with:
51+
test-suite-name: smoke-identity-ios
52+
platform: ios
53+
test_suite_tag: ".*SmokeIdentity.*"
54+
secrets: inherit
55+
56+
smoke-accounts-ios:
57+
name: "Accounts Smoke (iOS)"
58+
uses: ./.github/workflows/run-e2e-workflow.yml
59+
with:
60+
test-suite-name: smoke-accounts-ios
61+
platform: ios
62+
test_suite_tag: ".*SmokeAccounts.*"
63+
secrets: inherit
64+
65+
smoke-network-abstraction-ios:
66+
name: "Network Abstraction Smoke (iOS)"
67+
uses: ./.github/workflows/run-e2e-workflow.yml
68+
with:
69+
test-suite-name: smoke-network-abstraction-ios
70+
platform: ios
71+
test_suite_tag: ".*SmokeNetworkAbstraction.*"
72+
secrets: inherit
73+
74+
smoke-network-expansion-ios:
75+
name: "Network Expansion Smoke (iOS)"
76+
uses: ./.github/workflows/run-e2e-workflow.yml
77+
with:
78+
test-suite-name: smoke-network-expansion-ios
79+
platform: ios
80+
test_suite_tag: ".*NetworkExpansion.*"
81+
secrets: inherit
82+
83+
smoke-performance-ios:
84+
name: "Performance Smoke (iOS)"
85+
uses: ./.github/workflows/run-e2e-workflow.yml
86+
with:
87+
test-suite-name: smoke-performance-ios
88+
platform: ios
89+
test_suite_tag: ".*Performance.*"
90+
secrets: inherit
91+
92+
smoke-card-ios:
93+
name: "Card Smoke (iOS)"
94+
uses: ./.github/workflows/run-e2e-workflow.yml
95+
with:
96+
test-suite-name: smoke-card-ios
97+
platform: ios
98+
test_suite_tag: ".*SmokeCard.*"
99+
secrets: inherit
100+
101+
report-ios-smoke-tests:
102+
name: Report iOS Smoke Tests
103+
runs-on: ubuntu-latest
104+
if: always()
105+
needs:
106+
- smoke-confirmations-ios
107+
- smoke-confirmations-redesigned-ios
108+
- smoke-trade-ios
109+
- smoke-wallet-platform-ios
110+
- smoke-identity-ios
111+
- smoke-accounts-ios
112+
- smoke-network-abstraction-ios
113+
- smoke-network-expansion-ios
114+
- smoke-performance-ios
115+
- smoke-card-ios
116+
117+
steps:
118+
- name: Checkout
119+
uses: actions/checkout@v4
120+
121+
- name: Download all test results
122+
uses: actions/download-artifact@v4
123+
with:
124+
path: all-test-results/
125+
pattern: "*-ios-test-results"
126+
127+
- name: Post Test Report
128+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3
129+
with:
130+
name: "iOS E2E Smoke Test Results"
131+
path: "all-test-results/**/*.xml"
132+
reporter: "jest-junit"
133+
fail-on-error: false
134+
list-suites: "all"
135+
list-tests: "all"
136+
137+
- name: Upload merged report
138+
uses: actions/upload-artifact@v4
139+
with:
140+
name: ios-merged-test-report
141+
path: all-test-results/**/*.xml

.github/workflows/run-e2e-workflow.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
test-e2e-mobile:
3030
name: ${{ inputs.test-suite-name }}
3131
runs-on: ${{ inputs.platform == 'ios' && 'macos-latest-xlarge' || 'gha-mmsdk-scale-set-ubuntu-22.04-amd64-large' }}
32-
continue-on-error: true
3332

3433
env:
3534
METAMASK_ENVIRONMENT: 'qa'

0 commit comments

Comments
 (0)