Skip to content

fix: Forward device option in UI critical test lanes #2142

fix: Forward device option in UI critical test lanes

fix: Forward device option in UI critical test lanes #2142

Workflow file for this run

name: Test V10
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, labeled]
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_v10_for_prs: ${{ steps.changes.outputs.run_v10_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
build-test-server:
name: Build test server
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_v10_for_prs == 'true'
needs: files-changed
runs-on: macos-15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache for Test Server
id: cache_test_server
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ./test-server/.build
key: test-server-${{ hashFiles('test-server/**') }}-arm64
restore-keys: |
test-server-
- name: Build Test Server
working-directory: test-server
run: |
set -o pipefail
make release-arm64 2>&1 | tee test-server-build.log
- name: Archiving DerivedData
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: test-server
path: |
./test-server/test-server-exec
- name: Archiving Raw Test Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: test-server-build-log
path: |
test-server/test-server-build.log
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: failure()
test-v10:
name: Test V10 ${{ matrix.platform }}
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_v10_for_prs == 'true'
needs: files-changed
runs-on: macos-26
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- platform: iOS
make-target: test-ios-v10
- platform: macOS
make-target: test-macos-v10
- platform: Catalyst
make-target: test-catalyst-v10
- platform: tvOS
make-target: test-tvos-v10
- platform: visionOS
make-target: test-visionos-v10
steps:
- name: Warm CoreSimulator
run: xcrun simctl list runtimes -j > /dev/null 2>&1 &
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: ${{ matrix.platform }}
- name: Ensure required runtime is loaded
if: ${{ matrix.platform == 'iOS' || matrix.platform == 'tvOS' || matrix.platform == 'visionOS' }}
timeout-minutes: 5
env:
OS_VERSION: ${{ steps.resolve-test-destination.outputs.TEST_OS }}
PLATFORM: ${{ matrix.platform }}
run: ./scripts/ci-ensure-runtime-loaded.sh --os-version "$OS_VERSION" --platform "$PLATFORM"
- name: Run V10 tests
env:
IOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.ios-simulator-os }}
IOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
TVOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.tvos-simulator-os }}
TVOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
VISIONOS_SIMULATOR_OS: ${{ steps.setup-xcode.outputs.visionos-simulator-os }}
VISIONOS_DEVICE_NAME: ${{ steps.resolve-test-destination.outputs.TEST_DEVICE }}
run: make ${{ matrix.make-target }}
- name: Archiving Raw Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-output-v10-${{ matrix.platform }}
path: |
raw-build-output.log
raw-build-for-testing-output.log
raw-test-output.log
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
test-v10-with-test-server:
name: Test V10 with Test Server
if: github.event_name != 'pull_request' || needs.files-changed.outputs.run_v10_for_prs == 'true'
needs: [files-changed, build-test-server]
runs-on: macos-26
timeout-minutes: 20
steps:
- name: Warm CoreSimulator
run: xcrun simctl list runtimes -j > /dev/null 2>&1 &
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: test-server
- name: Start Test Server
run: |
chmod +x test-server-exec
make -C test-server start TEST_SERVER_EXECUTABLE=../test-server-exec
- name: Setup Xcode
id: setup-xcode
uses: ./.github/actions/setup-xcode
with:
version: "26"
- name: Resolve test destination
id: resolve-test-destination
uses: ./.github/actions/resolve-test-destination
with:
platform: macOS
- name: Build tests
id: build_tests
env:
REF_NAME: ${{ github.ref_name }}
OS_VERSION: ${{ steps.resolve-test-destination.outputs.TEST_OS }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform macOS \
--os "${OS_VERSION}" \
--ref "${REF_NAME}" \
--command build-for-testing \
--configuration TestV10 \
--scheme SentryV10 \
--test-plan Sentry_TestServer
- name: Run tests
env:
REF_NAME: ${{ github.ref_name }}
OS_VERSION: ${{ steps.resolve-test-destination.outputs.TEST_OS }}
run: |
./scripts/sentry-xcodebuild.sh \
--platform macOS \
--os "${OS_VERSION}" \
--ref "${REF_NAME}" \
--command test-without-building \
--configuration TestV10 \
--scheme SentryV10 \
--test-plan Sentry_TestServer
- name: Stop Test Server
if: ${{ always() }}
run: make -C test-server stop
- name: Archiving DerivedData Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: steps.build_tests.outcome == 'failure'
with:
name: derived-data-v10-test-server
path: |
/Users/runner/Library/Developer/Xcode/DerivedData/**/Logs/**
- name: Archiving Raw Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: raw-output-v10-test-server
path: |
raw-build-output.log
raw-build-for-testing-output.log
raw-test-output.log
- name: Archiving Crash Logs
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
if: ${{ failure() || cancelled() }}
with:
name: crash-logs-v10-test-server
path: |
~/Library/Logs/DiagnosticReports/**
- name: Run CI Diagnostics
uses: ./.github/actions/ci-diagnostics
if: ${{ failure() || cancelled() }}
test-v10-required-check:
needs:
[
files-changed,
build-test-server,
test-v10,
test-v10-with-test-server,
run-full-ci-gate,
]
name: Test V10
if: always()
runs-on: ubuntu-latest
steps:
- name: Check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "One of the V10 test jobs has failed." && exit 1