66 - release/**
77 pull_request :
88 paths-ignore :
9- - ' file/**'
9+ - " file/**"
1010
1111env :
1212 SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
@@ -103,7 +103,7 @@ jobs:
103103 avd-name : macOS-avd-x86_64-31
104104 emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
105105 disable-animations : true
106- script : flutter test integration_test/integration_test.dart --verbose
106+ script : flutter test integration_test --verbose
107107
108108 test-ios :
109109 runs-on : macos-13
@@ -114,8 +114,8 @@ jobs:
114114 strategy :
115115 fail-fast : false
116116 matrix :
117- # 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
118- sdk : ["stable "]
117+ sdk : ["stable", "beta"]
118+ target : ["ios", "macos "]
119119 steps :
120120 - name : checkout
121121 uses : actions/checkout@v3
@@ -131,25 +131,30 @@ jobs:
131131 run : flutter pub get
132132
133133 - name : pod install
134- working-directory : ./flutter/example/ios
134+ working-directory : ./flutter/example/${{ matrix.target }}
135135 run : pod install
136136
137- - name : launch ios simulator
138- id : sim
137+ - name : prepare test device
138+ id : device
139139 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-
140+ case "${{ matrix.target }}" in
141+ ios)
142+ device=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-4)
143+ xcrun simctl boot ${device}
144+ destination="platform=iOS Simulator,id=${device}"
145+ ;;
146+ macos)
147+ device="macos"
148+ echo "platform=OS X" >> "$GITHUB_OUTPUT"
149+ ;;
150+ esac
151+ echo "name=${device}" >> "$GITHUB_OUTPUT"
152+
153+ - name : run integration test
154+ # Disable flutter integration tests for iOS for now (https://github.com/getsentry/sentry-dart/issues/1605#issuecomment-1695809346)
155+ if : ${{ matrix.target != 'ios' }}
156+ run : flutter test -d "${{ steps.device.outputs.name }}" integration_test --verbose
157+
158+ - name : run native test
159+ working-directory : ./flutter/example/${{ matrix.target }}
160+ run : xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=${{ steps.device.outputs.platform }}" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO
0 commit comments