Skip to content

feat: Add propagating of traceparent #15353

feat: Add propagating of traceparent

feat: Add propagating of traceparent #15353

Workflow file for this run

name: UI Tests
on:
push:
branches:
- main
pull_request:
# 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:
files-changed:
name: Detect File Changes
runs-on: ubuntu-latest
outputs:
run_ui_tests_for_prs: ${{ steps.changes.outputs.run_ui_tests_for_prs }}
steps:
- uses: actions/checkout@v5
- name: Get changed files
id: changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.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}} V3 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
strategy:
matrix:
include:
- name: iOS Objective-C
target: ios_objc
- name: tvOS Swift
target: tvos_swift
with:
fastlane_command: ui_tests_${{matrix.target}}
xcode_version: 16.2
build_with_make: true
macos_version: macos-14
codecov_test_analytics: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# SwiftUI only supports iOS 14+ so we run it in a separate matrix here
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 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_swiftui
xcode_version: 16.4
build_with_make: true
macos_version: macos-15
codecov_test_analytics: true
device: iPhone 16 Pro
test-destination-os: "18.4"
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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}} V5 # Up the version with every change to keep track of flaky tests
uses: ./.github/workflows/ui-tests-common.yml
strategy:
fail-fast: false
matrix:
include:
- name: iOS 16
runs-on: macos-13
xcode: "14.3.1"
device: iPhone 14 Pro
test-destination-os: "16.4"
- name: iOS 17
runs-on: macos-14
xcode: "15.4"
device: iPhone 15 Pro
test-destination-os: "17.5"
- name: iOS 18
runs-on: macos-15
xcode: "16.4"
device: iPhone 16 Pro
test-destination-os: "18.4"
- name: iOS 26
runs-on: macos-15
platform: "iOS"
xcode: "26.0.1"
device: iPhone 16 Pro
test-destination-os: "26.0"
with:
fastlane_command: ui_tests_ios_swift
files_suffix: _xcode_${{matrix.xcode}}-${{matrix.device}}
xcode_version: ${{matrix.xcode}}
build_with_make: true
macos_version: ${{matrix.runs-on}}
platform: ${{matrix.platform}}
test-destination-os: ${{matrix.test-destination-os}}
device: ${{matrix.device}}
codecov_test_analytics: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
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 V3 # 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.4
build_with_make: true
macos_version: macos-15
codecov_test_analytics: true
device: iPhone 16 Pro
test-destination-os: "18.4"
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# 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,
]
name: UI Tests
# 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