Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test timeout #37

Merged
merged 16 commits into from
Jul 11, 2023
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ jobs:

android:
runs-on: macos-latest
timeout-minutes: 30
strategy:
max-parallel: 3
matrix:
api-level: [31,30,29,28,27,26,25,24]
target: [default]
Expand Down Expand Up @@ -131,15 +133,16 @@ jobs:
${{ runner.os }}-pub-

- name: Install Flutter dependencies
run: flutter --disable-telemetry && flutter pub get ./example
run: flutter --disable-telemetry && flutter pub get ./example

# More info on https://github.com/ReactiveCircus/android-emulator-runner
- name: Run integration tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
working-directory: ./example
script: |
echo ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=600 >> $GITHUB_ENV
Expand Down
2 changes: 2 additions & 0 deletions example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import '../lib/main.dart' as app;

/// All tests are done in integration tests,
/// since only integration tests can call native code.
// ignore: invalid_annotation_target
@Timeout(Duration(hours: 2))
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
Platform.isAndroid
Expand Down