Android E2E Regression Tests #762
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android E2E Regression Tests | |
| on: | |
| schedule: | |
| - cron: '0 */3 * * *' # Every 3 hours | |
| workflow_dispatch: | |
| inputs: | |
| notify_on_pass: | |
| description: 'Send Slack notification even when all tests pass' | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| id-token: write | |
| actions: read | |
| jobs: | |
| build-android-apks: | |
| name: 'Build Android APKs' | |
| if: ${{ github.event_name != 'merge_group' }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| uses: ./.github/workflows/build-android-e2e.yml | |
| with: | |
| build_type: 'main' | |
| metamask_environment: 'e2e' | |
| keystore_target: 'qa' | |
| secrets: inherit | |
| regression-confirmations-android: | |
| name: 'Confirmations Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-confirmations-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionConfirmations' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-confirmations-redesigned-android: | |
| name: 'Confirmations Redesigned Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-confirmations-redesigned-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionConfirmationsRedesigned' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 2 | |
| secrets: inherit | |
| regression-trade-android: | |
| name: 'Trade Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-trade-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionTrade' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-wallet-platform-android: | |
| name: 'Wallet Platform Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-wallet-platform-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionWalletPlatform' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-accounts-android: | |
| name: 'Accounts Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-accounts-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionAccounts' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-network-abstraction-android: | |
| name: 'Network Abstraction Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-network-abstraction-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionNetworkAbstractions' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-network-expansion-android: | |
| name: 'Network Expansion Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2, 3, 4] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-network-expansion-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionNetworkExpansion' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 4 | |
| secrets: inherit | |
| regression-assets-android: | |
| name: 'Assets Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1, 2] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-assets-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionAssets' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 2 | |
| secrets: inherit | |
| regression-ux-android: | |
| name: 'UX Regression (Android) - ${{ matrix.split }}' | |
| needs: [build-android-apks] | |
| strategy: | |
| matrix: | |
| split: [1] | |
| fail-fast: false | |
| uses: ./.github/workflows/run-e2e-workflow.yml | |
| with: | |
| test-suite-name: regression-ux-android-${{ matrix.split }} | |
| platform: android | |
| test_suite_tag: 'RegressionWalletUX' | |
| split_number: ${{ matrix.split }} | |
| total_splits: 1 | |
| secrets: inherit | |
| report-android-regression-tests: | |
| name: Report Android Regression Tests | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - build-android-apks | |
| - regression-confirmations-android | |
| - regression-confirmations-redesigned-android | |
| - regression-trade-android | |
| - regression-wallet-platform-android | |
| - regression-accounts-android | |
| - regression-network-abstraction-android | |
| - regression-network-expansion-android | |
| - regression-assets-android | |
| - regression-ux-android | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Download shards test artifacts (XMLs + Screenshots) | |
| uses: actions/download-artifact@v4 | |
| continue-on-error: true | |
| with: | |
| path: all-test-artifacts/ | |
| pattern: '*-android-*-test-*' | |
| - name: Post Test Report | |
| uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 | |
| with: | |
| name: 'Android E2E Regression 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 | |
| continue-on-error: true | |
| with: | |
| name: e2e-regression-android-all-test-artifacts | |
| path: all-test-artifacts/ | |
| - name: Generate Test Summary | |
| id: summary | |
| continue-on-error: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| EXIT_CODE=0 | |
| { | |
| echo "summary<<EOF" | |
| node .github/scripts/generate-regression-slack-summary.mjs Android || EXIT_CODE=$? | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| exit $EXIT_CODE | |
| - name: Prepare Slack Payload | |
| if: always() && (steps.summary.outcome == 'failure' || inputs.notify_on_pass == true) | |
| run: | | |
| node -e " | |
| const fs = require('fs'); | |
| const message = \`${{ steps.summary.outputs.summary }}\`; | |
| const hasFailed = '${{ steps.summary.outcome }}' === 'failure'; | |
| const title = hasFailed ? 'Android E2E Regression Test Failures' : 'Android E2E Regression Test Results'; | |
| const payload = { | |
| text: title, | |
| blocks: [ | |
| { | |
| type: 'section', | |
| text: { | |
| type: 'mrkdwn', | |
| text: message | |
| } | |
| } | |
| ] | |
| }; | |
| fs.writeFileSync('/tmp/slack-payload.json', JSON.stringify(payload, null, 2)); | |
| " | |
| - name: Send Slack Notification | |
| if: always() && (steps.summary.outcome == 'failure' || inputs.notify_on_pass == true) | |
| uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a | |
| with: | |
| webhook: ${{ secrets.REGRESSION_E2E_SLACK_WEBHOOK_URL }} | |
| webhook-type: incoming-webhook | |
| payload-file-path: /tmp/slack-payload.json |