Skip to content

iOS Device Tests

iOS Device Tests #8299

name: iOS Device Tests
on:
push:
branches:
- main
- release/*
pull_request:
paths:
# Core SDK (transitive dependency of all mobile packages)
- 'src/Sentry/**'
- 'src/Sentry.Extensions.Logging/**'
- 'src/Sentry.Compiler.Extensions/**'
# Mobile-specific packages
- 'src/Sentry.Maui/**'
- 'src/Sentry.Maui.CommunityToolkit.Mvvm/**'
- 'src/Sentry.Bindings.Android/**'
- 'src/Sentry.Bindings.Cocoa/**'
- 'src/Sentry.Android.AssemblyReader/**'
# Device test app and test projects that run on device
- 'test/Sentry.Maui.Device.TestApp/**'
- 'test/Sentry.Tests/**'
- 'test/Sentry.Extensions.Logging.Tests/**'
- 'test/Sentry.Maui.Tests/**'
- 'test/Sentry.Maui.CommunityToolkit.Mvvm.Tests/**'
- 'test/Sentry.Android.AssemblyReader.Tests/**'
- 'test/Sentry.Testing/**'
- 'test/AndroidTestApp/**'
# Integration tests
- 'integration-test/android.Tests.ps1'
- 'integration-test/ios.Tests.ps1'
- 'integration-test/net9-maui/**'
- 'integration-test/common.ps1'
- 'integration-test/Directory.Build.*'
# Native libraries and modules
- 'lib/sentrysupplemental/**'
- 'lib/sentry-android-supplemental/**'
- 'modules/sentry-native/**'
- 'modules/sentry-cocoa/**'
- 'modules/sentry-cocoa.properties'
# Build configuration (affects all builds)
- 'global.json'
- 'Directory.Build.props'
- 'Directory.Build.targets'
- 'nuget.config'
# Scripts and CI
- 'scripts/device-test.ps1'
- 'scripts/device-test-utils.ps1'
- '.github/workflows/device-tests-ios.yml'
- '.github/actions/**'
workflow_dispatch:
jobs:
ios-tests:
runs-on: macos-15
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
NO_ANDROID: true
NO_MACCATALYST: true
steps:
- name: Cancel Previous Runs
if: github.ref_name != 'main' && !startsWith(github.ref_name, 'release/')
uses: styfle/cancel-workflow-action@3155a141048f8f89c06b4cdae32e7853e97536bc # 0.13.0
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive
- name: Setup Environment
uses: ./.github/actions/environment
- name: Build iOS Test App
run: pwsh ./scripts/device-test.ps1 ios -Build
- name: Run Tests
id: first-test-run
continue-on-error: true
timeout-minutes: 40
run: pwsh scripts/device-test.ps1 ios -Run
- name: Retry Tests (if previous failed to run)
if: steps.first-test-run.outcome == 'failure'
timeout-minutes: 40
run: pwsh scripts/device-test.ps1 ios -Run
- name: Run Integration Tests
id: first-integration-test-run
continue-on-error: true
timeout-minutes: 40
uses: getsentry/github-workflows/sentry-cli/integration-test@747c4c2906d373f5cd809abe94a7fd732a2421a7 # 3.2.1
with:
path: integration-test/ios.Tests.ps1
- name: Retry Integration Tests (if previous failed to run)
if: steps.first-integration-test-run.outcome == 'failure'
timeout-minutes: 40
uses: getsentry/github-workflows/sentry-cli/integration-test@747c4c2906d373f5cd809abe94a7fd732a2421a7 # 3.2.1
with:
path: integration-test/ios.Tests.ps1
- name: Upload results
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: device-test-ios-results
path: |
test_output
integration-test/mobile-app/test_output