chore(deps): update Cocoa SDK to v8.17.1 #672
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: flutter native & integration test | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
paths-ignore: | |
- "**/*.md" | |
- "file/**" | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
jobs: | |
cancel-previous-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # [email protected] | |
with: | |
access_token: ${{ github.token }} | |
test-android: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
working-directory: ./flutter/example | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: ["stable", "beta"] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "adopt" | |
java-version: "11" | |
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # [email protected] | |
with: | |
channel: ${{ matrix.sdk }} | |
- name: flutter upgrade | |
run: flutter upgrade | |
- name: flutter pub get | |
run: flutter pub get | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@v2 | |
- name: AVD cache | |
uses: actions/cache@v3 | |
id: avd-cache | |
with: | |
path: | | |
~/.android/avd/* | |
~/.android/adb* | |
key: avd-31 | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected] | |
with: | |
working-directory: ./flutter/example | |
api-level: 31 | |
profile: Nexus 6 | |
arch: x86_64 | |
force-avd-creation: false | |
avd-name: macOS-avd-x86_64-31 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: echo 'Generated AVD snapshot for caching.' | |
- name: build apk | |
working-directory: ./flutter/example/android | |
run: flutter build apk --debug | |
- name: launch android emulator & run android native test | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected] | |
with: | |
working-directory: ./flutter/example/android | |
api-level: 31 | |
profile: Nexus 6 | |
arch: x86_64 | |
force-avd-creation: false | |
avd-name: macOS-avd-x86_64-31 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: ./gradlew testDebugUnitTest | |
- name: launch android emulator & run android integration test | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected] | |
with: | |
working-directory: ./flutter/example | |
api-level: 31 | |
profile: Nexus 6 | |
arch: x86_64 | |
force-avd-creation: false | |
avd-name: macOS-avd-x86_64-31 | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
script: flutter test integration_test/all.dart --verbose | |
cocoa: | |
name: "${{ matrix.target }} | ${{ matrix.sdk }}" | |
runs-on: macos-13 | |
timeout-minutes: 30 | |
defaults: | |
run: | |
working-directory: ./flutter/example | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: ["stable", "beta"] | |
target: ["ios", "macos"] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # [email protected] | |
with: | |
channel: ${{ matrix.sdk }} | |
- name: flutter upgrade | |
run: flutter upgrade | |
- name: flutter pub get | |
run: flutter pub get | |
- name: pod install | |
working-directory: ./flutter/example/${{ matrix.target }} | |
run: pod install | |
- name: prepare test device | |
id: device | |
run: | | |
case "${{ matrix.target }}" in | |
ios) | |
device=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-17-0) | |
xcrun simctl boot ${device} | |
echo "platform=iOS Simulator,id=${device}" >> "$GITHUB_OUTPUT" | |
;; | |
macos) | |
device="macos" | |
echo "platform=OS X" >> "$GITHUB_OUTPUT" | |
;; | |
esac | |
echo "name=${device}" >> "$GITHUB_OUTPUT" | |
- name: run integration test | |
# Disable flutter integration tests for iOS for now (https://github.com/getsentry/sentry-dart/issues/1605#issuecomment-1695809346) | |
if: ${{ matrix.target != 'ios' }} | |
run: flutter test -d "${{ steps.device.outputs.name }}" integration_test/all.dart --verbose | |
- name: run native test | |
# We only have the native unit test package in the iOS xcodeproj at the moment. | |
# Should be OK because it will likely be removed after switching to FFI (see https://github.com/getsentry/sentry-dart/issues/1444). | |
if: ${{ matrix.target != 'macos' }} | |
working-directory: ./flutter/example/${{ matrix.target }} | |
run: xcodebuild test -workspace Runner.xcworkspace -scheme Runner -configuration Debug -destination "platform=${{ steps.device.outputs.platform }}" -allowProvisioningUpdates CODE_SIGNING_ALLOWED=NO |