@@ -21,71 +21,97 @@ jobs:
2121 runs-on : macos-latest
2222 timeout-minutes : 30
2323 defaults :
24- run :
25- working-directory : ./flutter/example
24+ run :
25+ working-directory : ./flutter/example
2626 strategy :
27- fail-fast : false
28- matrix :
29- sdk : ['stable', 'beta']
27+ fail-fast : false
28+ matrix :
29+ sdk : ['stable', 'beta']
3030 steps :
31- - name : checkout
32- uses : actions/checkout@v3
31+ - name : checkout
32+ uses : actions/checkout@v3
3333
34- - uses : actions/setup-java@v3
35- with :
36- distribution : ' adopt'
37- java-version : ' 11'
34+ - uses : actions/setup-java@v3
35+ with :
36+ distribution : ' adopt'
37+ java-version : ' 11'
3838
39- -
uses :
subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] 40- with :
41- channel : ${{ matrix.sdk }}
39+ -
uses :
subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] 40+ with :
41+ channel : ${{ matrix.sdk }}
4242
43- - name : flutter upgrade
44- run : flutter upgrade
43+ - name : flutter upgrade
44+ run : flutter upgrade
4545
46- - name : flutter pub get
47- run : flutter pub get
46+ - name : flutter pub get
47+ run : flutter pub get
48+
49+ - name : Gradle cache
50+ uses : gradle/gradle-build-action@v2
51+
52+ - name : AVD cache
53+ uses : actions/cache@v3
54+ id : avd-cache
55+ with :
56+ path : |
57+ ~/.android/avd/*
58+ ~/.android/adb*
59+ key : avd-21
60+
61+ - name : create AVD and generate snapshot for caching
62+ if : steps.avd-cache.outputs.cache-hit != 'true'
63+ uses :
reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # [email protected] 64+ with :
65+ working-directory : ./flutter/example
66+ api-level : 21
67+ force-avd-creation : false
68+ emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
69+ disable-animations : false
70+ arch : x86_64
71+ profile : Nexus 6
72+ script : echo "Generated AVD snapshot for caching."
4873
4974 - name : launch android emulator & run android integration test
50- uses : reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 # pin@v2.27 .0
75+ uses : reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # pin@v2.28 .0
5176 with :
5277 working-directory : ./flutter/example
5378 api-level : 21
79+ force-avd-creation : false
80+ emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
81+ disable-animations : true
5482 arch : x86_64
5583 profile : Nexus 6
5684 script : flutter test integration_test/integration_test.dart --verbose
5785
58- # Enable after fixing https://github.com/getsentry/sentry-dart/issues/1448
59- # test-ios:
60- # runs-on: macos-latest
61- # timeout-minutes: 30
62- # defaults:
63- # run:
64- # working-directory: ./flutter/example
65- # strategy:
66- # fail-fast: false
67- # matrix:
68- # # 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
69- # sdk: ['stable']
70- # steps:
71- # - name: checkout
72- # uses: actions/checkout@v3
86+ test-ios :
87+ runs-on : macos-13
88+ timeout-minutes : 30
89+ defaults :
90+ run :
91+ working-directory : ./flutter/example
92+ strategy :
93+ fail-fast : false
94+ matrix :
95+ # 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340
96+ sdk : ['stable']
97+ steps :
98+ - name : checkout
99+ uses : actions/checkout@v3
73100
74- # - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] 75- # with:
76- # channel: ${{ matrix.sdk }}
101+ -
uses :
subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] 102+ with :
103+ channel : ${{ matrix.sdk }}
77104
78- # - name: flutter upgrade
79- # run: flutter upgrade
105+ - name : flutter upgrade
106+ run : flutter upgrade
80107
81- # - name: flutter pub get
82- # run: flutter pub get
108+ - name : flutter pub get
109+ run : flutter pub get
83110
84- # - name: launch ios emulator
85- # uses: futureware-tech/simulator-action@ee05c113b79f056b47f354d7b313555f5491e158 #pin@v2
86- # with:
87- # model: 'iPhone 14'
88- # os_version: '16.2'
111+ - name : launch ios simulator
112+ run : |
113+ simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-2)
114+ xcrun simctl boot ${simulator_id}
89115
90- # - name: run ios integration test
91- # run: flutter test integration_test/integration_test.dart --verbose
116+ - name : run ios integration test
117+ run : flutter test integration_test/integration_test.dart --verbose
0 commit comments