Skip to content

Commit

Permalink
Merge pull request #64 from natsuk4ze/refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
natsuk4ze authored Aug 3, 2023
2 parents 638165b + cb34807 commit 583aab3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
43 changes: 36 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,27 @@ jobs:
- name: Run integration tests
id: Run-integration-tests
continue-on-error: true
timeout-minutes: 15
run: |
cd example
flutter test integration_test/integration_test.dart --timeout none
flutter test integration_test/integration_test.dart
- name: Retry integration tests
id: Retry-integration-tests
continue-on-error: true
if: steps.Run-integration-tests.outcome == 'failure'
timeout-minutes: 20
run: |
flutter clean && flutter pub get
cd example
flutter clean && flutter pub get
flutter test integration_test/integration_test.dart --timeout none
flutter test integration_test/integration_test.dart
- name: Re:Retry integration tests
if: steps.Retry-integration-tests.outcome == 'failure'
run: |
flutter clean && flutter pub get
cd example
flutter clean && flutter pub get
flutter test integration_test/integration_test.dart
android:
needs: set-up
Expand Down Expand Up @@ -119,16 +127,37 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none
script: |
if [ ${{ matrix.api-level }} -le 29 ]; then flutter build apk --debug; adb install -r build/app/outputs/flutter-apk/app-debug.apk; adb shell pm grant studio.midoridesign.gal_example android.permission.WRITE_EXTERNAL_STORAGE; fi
flutter test integration_test/integration_test.dart --timeout none
flutter test integration_test/integration_test.dart
- name: Retry integration tests
id: Retry-integration-tests
continue-on-error: true
if: steps.Run-integration-tests.outcome == 'failure'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
working-directory: ./example
arch: x86_64
emulator-boot-timeout: 300
emulator-boot-timeout: 120
force-avd-creation: false
sdcard-path-or-size: ${{ matrix.api-level <= 23 && '10M' || null }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none
pre-emulator-launch-script: |
adb kill-server
adb start-server
script: |
flutter clean && flutter pub get
if [ ${{ matrix.api-level }} -le 29 ]; then flutter build apk --debug; adb install -r build/app/outputs/flutter-apk/app-debug.apk; adb shell pm grant studio.midoridesign.gal_example android.permission.WRITE_EXTERNAL_STORAGE; fi
flutter test integration_test/integration_test.dart
- name: Re:Retry integration tests
if: steps.Retry-integration-tests.outcome == 'failure'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
working-directory: ./example
arch: x86_64
emulator-boot-timeout: 120
force-avd-creation: false
sdcard-path-or-size: ${{ matrix.api-level <= 23 && '10M' || null }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none
Expand All @@ -138,4 +167,4 @@ jobs:
script: |
flutter clean && flutter pub get
if [ ${{ matrix.api-level }} -le 29 ]; then flutter build apk --debug; adb install -r build/app/outputs/flutter-apk/app-debug.apk; adb shell pm grant studio.midoridesign.gal_example android.permission.WRITE_EXTERNAL_STORAGE; fi
flutter test integration_test/integration_test.dart --timeout none
flutter test integration_test/integration_test.dart
1 change: 0 additions & 1 deletion example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void main() {

void execute(String key) => testWidgets(key, (tester) async {
await tester.pumpWidget(const app.App());
await tester.pumpAndSettle();

final button = find.byKey(Key(key));

Expand Down

0 comments on commit 583aab3

Please sign in to comment.