Skip to content

Commit befa4de

Browse files
Trying to get emulator action to work
1 parent 0d09645 commit befa4de

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.github/workflows/pr_validation.yaml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
channel: stable
3535
architecture: x64
3636

37+
- name: Install Flutter Dependencies
38+
run: flutter pub get
39+
40+
- name: Build Flutter App (Debug Mode)
41+
# Must be debug mode so we can enable Flutter Driver.
42+
run: flutter build apk --debug
43+
3744
- name: Install Android SDK and launch emulator
3845
uses: reactivecircus/android-emulator-runner@v2
3946
with:
@@ -57,12 +64,8 @@ jobs:
5764
adb shell input keyevent 82 # Unlock the emulator screen if it's locked
5865
echo ""
5966
60-
echo "Getting Flutter dependencies"
61-
cd packages/flutter_test_runners/example_deep_links && flutter pub get
62-
echo ""
63-
64-
echo "Building and installing the APK"
65-
cd packages/flutter_test_runners/example_deep_links && flutter build apk --debug && flutter install --debug -d emulator-5554
67+
echo "Installing the APK"
68+
cd packages/flutter_test_runners/example_deep_links && flutter install --debug -d emulator-5554
6669
echo ""
6770
6871
echo "Running Flutter tests"
@@ -74,12 +77,6 @@ jobs:
7477
# adb wait-for-device
7578
# adb shell input keyevent 82 # Unlock the emulator screen if it's locked
7679
#
77-
# - name: Install Flutter Dependencies
78-
# run: flutter pub get
79-
#
80-
# - name: Build Flutter App (Debug Mode)
81-
# # Must be debug mode so we can enable Flutter Driver.
82-
# run: flutter build apk --debug
8380
#
8481
# - name: Install App on Emulator
8582
# run: flutter install --debug

packages/flutter_test_runners/lib/src/deep_links/deep_links_android.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ void testDeepLinkAndroidAppLaunch(
8080

8181
// Wait for a moment so that the app has time to start the Dart VM
8282
// service and report it in the ADB logs.
83+
//
84+
// When running locally, waiting 1 second is probably sufficient. But
85+
// when running in GitHub CI, we need to wait longer to make sure the
86+
// Dart VM service reports its URL.
8387
_log.info("Waiting a moment so that app can launch the Dart VM service.");
8488
await Future.delayed(const Duration(seconds: 5));
8589

0 commit comments

Comments
 (0)