Skip to content

docs: add mirroring documentation #24017

docs: add mirroring documentation

docs: add mirroring documentation #24017

Workflow file for this run

name: UI Tests
on:
push:
branches:
- main
- v8.x
pull_request:
types: [opened, synchronize, reopened, labeled]
# Concurrency configuration:
# - We use workflow-specific concurrency groups to prevent multiple UI test runs on the same code,
# as UI tests are resource-intensive and long-running operations.
# - For pull requests, we cancel in-progress runs when new commits are pushed to provide faster
# feedback and avoid wasting expensive UI testing resources on outdated code.
# - For main branch pushes, we never cancel UI tests to ensure complete validation of the user
# interface before the code reaches production, maintaining our quality standards.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
run-full-ci-gate:
name: run-full-ci gate
uses: ./.github/workflows/run-full-ci-workflow.yml
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
needs: run-full-ci-gate
outputs:
run_ui_tests_for_prs: ${{ steps.changes.outputs.run_ui_tests_for_prs }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Get changed files
id: changes
uses: dorny/paths-filter@7b450fff21473bca461d4b92ce414b9d0420d706 # v4.0.2
with:
token: ${{ github.token }}
filters: .github/file-filters.yml
ui-tests:
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_ui_tests_for_prs == 'true'
needs: files-changed
name: Test ${{matrix.name}} V4 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
strategy:
fail-fast: false
matrix:
job_id:
- ios_objc
- tvos_swift
include:
- job_id: ios_objc
name: iOS Objective-C
target: ios_objc
platform: iOS
- job_id: tvos_swift
name: tvOS Swift
target: tvos_swift
platform: tvOS
with:
fastlane_command: ui_tests_${{matrix.target}}
xcode_version: "16"
build_with_make: true
macos_version: "sequoia"
files_suffix: _${{matrix.target}}_
platform: ${{matrix.platform}}
ui-tests-swift-ui:
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_ui_tests_for_prs == 'true'
needs: files-changed
name: Test SwiftUI V5 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
with:
fastlane_command: ui_tests_ios_swiftui
build_with_make: true
xcode_version: "16"
macos_version: "sequoia"
files_suffix: _swiftui_
platform: "iOS"
ui-tests-swift:
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_ui_tests_for_prs == 'true'
needs: files-changed
name: Test Swift ${{matrix.name}} V6 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
strategy:
fail-fast: false
matrix:
job_id:
- ios_17
- ios_18
- ios_26
include:
- job_id: ios_17
name: iOS 17
runs_on: sequoia
xcode: "16"
test_destination_os: "17.5"
platform: "iOS"
device: iPhone 15 Pro
- job_id: ios_18
name: iOS 18
runs_on: sequoia
xcode: "16"
platform: "iOS"
- job_id: ios_26
name: iOS 26
runs_on: tahoe
xcode: "26"
platform: "iOS"
with:
fastlane_command: ui_tests_ios_swift
files_suffix: _xcode_${{matrix.xcode}}-${{matrix.device}}
build_with_make: true
macos_version: ${{matrix.runs_on}}
xcode_version: ${{ matrix.xcode}}
test-destination-os: ${{matrix.test_destination_os}}
platform: ${{matrix.platform}}
device: ${{matrix.device}}
ui-tests-swift6:
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_ui_tests_for_prs == 'true'
needs: files-changed
name: Test iOS Swift6 V4 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
with:
fastlane_command: ui_tests_ios_swift6
xcode_version: "16"
build_with_make: true
macos_version: "sequoia"
platform: iOS
files_suffix: _swift6_
# This check validates that either UI tests passed or were skipped, which allows us
# to make UI tests a required check with only running the UI tests when required.
# So, we don't have to run UI tests, for example, for unrelated changes.
ui_tests-required-check:
needs:
[
files-changed,
ui-tests,
ui-tests-swift-ui,
ui-tests-swift,
ui-tests-swift6,
run-full-ci-gate,
]
name: UI Tests - Check
# This is necessary since a failed/skipped dependent job would cause this job to be skipped
if: always()
runs-on: ubuntu-latest
steps:
# If any jobs we depend on fails gets cancelled or times out, this job will fail.
# Skipped jobs are not considered failures.
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One of the UI test jobs has failed." && exit 1