-
-
Notifications
You must be signed in to change notification settings - Fork 207
80 lines (68 loc) · 2.09 KB
/
device-tests-ios.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: iOS Device Tests
on:
push:
branches:
- main
- release/*
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
# Pinning `macos-13` because Microsoft.iOS 16.4 requires Xcode 14.3 which is only built-in in 13
runs-on: macos-13
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@85880fa0301c86cca9da44039ee3bb12d3bedbfa # Tag: 0.12.1
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Cocoa SDK
uses: ./.github/actions/buildcocoasdk
- name: Setup Environment
uses: ./.github/actions/environment
- name: Build iOS Test App
run: pwsh ./scripts/device-test.ps1 ios -Build
- name: Upload iOS Test App
uses: actions/upload-artifact@v4
with:
name: device-test-ios
if-no-files-found: error
path: test/Sentry.Maui.Device.TestApp/bin/Release/net7.0-ios/iossimulator-x64/Sentry.Maui.Device.TestApp.app
ios:
needs: [build]
name: Run iOS Tests
runs-on: macos-13
strategy:
fail-fast: false
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download test app artifact
uses: actions/download-artifact@v4
with:
name: device-test-ios
path: bin/Sentry.Maui.Device.TestApp.app
- name: Run Tests
id: first-run
continue-on-error: true
run: pwsh scripts/device-test.ps1 ios -Run
- name: Retry Tests (if previous failed to run)
if: steps.first-run.outcome == 'failure'
run: pwsh scripts/device-test.ps1 ios -Run
- name: Upload results
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: device-test-ios-results
path: test_output