6
6
- release/**
7
7
pull_request :
8
8
paths-ignore :
9
- - ' file/**'
9
+ - " file/**"
10
10
11
11
env :
12
12
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -103,9 +103,10 @@ jobs:
103
103
avd-name : macOS-avd-x86_64-31
104
104
emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
105
105
disable-animations : true
106
- script : flutter test integration_test/integration_test.dart --verbose
106
+ script : flutter test integration_test --verbose
107
107
108
- test-ios :
108
+ cocoa :
109
+ name : " ${{ matrix.target }} | ${{ matrix.sdk }}"
109
110
runs-on : macos-13
110
111
timeout-minutes : 30
111
112
defaults :
@@ -114,8 +115,8 @@ jobs:
114
115
strategy :
115
116
fail-fast : false
116
117
matrix :
117
- # 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
118
- sdk : ["stable "]
118
+ sdk : ["stable", "beta"]
119
+ target : ["ios", "macos "]
119
120
steps :
120
121
- name : checkout
121
122
uses : actions/checkout@v3
@@ -131,25 +132,33 @@ jobs:
131
132
run : flutter pub get
132
133
133
134
- name : pod install
134
- working-directory : ./flutter/example/ios
135
+ working-directory : ./flutter/example/${{ matrix.target }}
135
136
run : pod install
136
137
137
- - name : launch ios simulator
138
- id : sim
138
+ - name : prepare test device
139
+ id : device
139
140
run : |
140
- simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-4)
141
- echo "SIMULATOR_ID=${simulator_id}" >> "$GITHUB_OUTPUT"
142
- xcrun simctl boot ${simulator_id}
143
- # Disable flutter integration tests because of flaky execution
144
- # - name: run ios integration test
145
- # env:
146
- # SIMULATOR_ID: ${{ steps.sim.outputs.SIMULATOR_ID }}
147
- # run: flutter test -d "$SIMULATOR_ID" integration_test/integration_test.dart --verbose
148
-
149
- - name : run ios native test
150
- working-directory : ./flutter/example/ios
151
- env :
152
- SIMULATOR_ID : ${{ steps.sim.outputs.SIMULATOR_ID }}
153
- run : xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=iOS Simulator,id=$SIMULATOR_ID" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
154
-
155
-
141
+ case "${{ matrix.target }}" in
142
+ ios)
143
+ device=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-4)
144
+ xcrun simctl boot ${device}
145
+ echo "platform=iOS Simulator,id=${device}" >> "$GITHUB_OUTPUT"
146
+ ;;
147
+ macos)
148
+ device="macos"
149
+ echo "platform=OS X" >> "$GITHUB_OUTPUT"
150
+ ;;
151
+ esac
152
+ echo "name=${device}" >> "$GITHUB_OUTPUT"
153
+
154
+ - name : run integration test
155
+ # Disable flutter integration tests for iOS for now (https://github.com/getsentry/sentry-dart/issues/1605#issuecomment-1695809346)
156
+ if : ${{ matrix.target != 'ios' }}
157
+ run : flutter test -d "${{ steps.device.outputs.name }}" integration_test --verbose
158
+
159
+ - name : run native test
160
+ # We only have the native unit test package in the iOS xcodeproj at the moment.
161
+ # Should be OK because it will likely be removed after switching to FFI (see https://github.com/getsentry/sentry-dart/issues/1444).
162
+ if : ${{ matrix.target != 'macos' }}
163
+ working-directory : ./flutter/example/${{ matrix.target }}
164
+ run : xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=${{ steps.device.outputs.platform }}" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
0 commit comments