mattermost-mobile-upstream/.github/workflows/e2e-maestro-pr.yml
yasserfaraazkhan 29cdffdec2 ci(e2e): restore per-job TSIO reports and commit statuses
Each Detox/Maestro platform uploads and finalizes its own TSIO group
(total=1) and GitHub check (e2e/detox-*, e2e/maestro-*). CMT keeps an
umbrella e2e/compatibility-matrix-testing check plus per-shard contexts.
Channel notify stays a single rollup job to avoid per-leg spam.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 13:59:31 +05:30

99 lines
3.3 KiB
YAML

# Maestro E2E orchestration — reusable workflow only.
# Called from e2e-detox-pr.yml after shared builds and server provisioning complete.
# Downloads ios-build-simulator-* and android-maestro-build-files-* from the parent run
# via artifact_run_id; does not build apps or provision servers on its own.
name: Maestro E2E
on:
workflow_call:
inputs:
MOBILE_VERSION:
required: true
type: string
PLATFORM:
required: false
type: string
default: "both"
ANDROID_SITE_1_URL:
required: true
type: string
ANDROID_SITE_2_URL:
required: true
type: string
IOS_SITE_1_URL:
required: true
type: string
IOS_SITE_2_URL:
required: true
type: string
SITE_3_URL:
required: true
type: string
run_type:
required: false
type: string
default: "PR"
artifact_run_id:
description: "Run ID of the parent workflow that uploaded build artifacts"
required: true
type: string
record_tests_in_zephyr:
description: "Record Maestro test results in Zephyr Scale"
required: false
type: boolean
default: false
tsio-job-configs:
description: "JSON map of per-platform TSIO configs from parent calculate-tsio-identity"
required: true
type: string
# Least-privilege defaults; the TSIO upload (in the nested maestro template)
# needs id-token: write to mint an OIDC token and actions: read to resolve
# gh_job_id. Reusable workflows cannot escalate beyond the caller, so grant
# here too.
permissions:
contents: read
id-token: write
actions: read
statuses: write
# iOS and Android are invoked as separate workflow_call runs from e2e-detox-pr.yml;
# include PLATFORM so parallel calls do not cancel each other (same github.run_id).
concurrency:
group: "${{ github.workflow }}-${{ inputs.PLATFORM }}-${{ inputs.MOBILE_VERSION }}-${{ github.run_id }}"
cancel-in-progress: true
env:
ARTIFACT_RUN_ID: ${{ inputs.artifact_run_id }}
jobs:
run-maestro-ios:
name: Maestro iOS
if: inputs.PLATFORM == 'ios' || inputs.PLATFORM == 'both'
uses: ./.github/workflows/e2e-maestro-template.yml
with:
platform: ios
run-type: ${{ inputs.run_type || 'PR' }}
MOBILE_VERSION: ${{ inputs.MOBILE_VERSION }}
MM_TEST_SERVER_URL: ${{ inputs.IOS_SITE_1_URL }}
artifact_run_id: ${{ inputs.artifact_run_id }}
record_tests_in_zephyr: ${{ inputs.record_tests_in_zephyr }}
tsio-config: ${{ toJSON(fromJSON(inputs.tsio-job-configs)['maestro-ios-e2e']) }}
tsio-shard-name: maestro-ios-e2e
secrets: inherit
run-maestro-android:
name: Maestro Android
if: inputs.PLATFORM == 'android' || inputs.PLATFORM == 'both'
uses: ./.github/workflows/e2e-maestro-template.yml
with:
platform: android
run-type: ${{ inputs.run_type || 'PR' }}
MOBILE_VERSION: ${{ inputs.MOBILE_VERSION }}
MM_TEST_SERVER_URL: ${{ inputs.ANDROID_SITE_1_URL }}
artifact_run_id: ${{ inputs.artifact_run_id }}
record_tests_in_zephyr: ${{ inputs.record_tests_in_zephyr }}
tsio-config: ${{ toJSON(fromJSON(inputs.tsio-job-configs)['maestro-android-e2e']) }}
tsio-shard-name: maestro-android-e2e
secrets: inherit