Skip to content

Commit f26832c

Browse files
enedclaude
andcommitted
fix: Resolve drive_android test failures and integration test logic errors
CI workflow improvements: - Apply consistent melos bootstrap --sdk-path auto across all test jobs - Add debugging output for Android integration tests with flutter doctor - Fix Android gradle test path to avoid workmanager_android module references - Add verbose logging to integration tests for better error diagnosis Integration test fixes: - Fix incorrect skip logic: iOS tests were skipping ON iOS instead of on non-iOS - "initialize & cancelAll - iOS" now runs on iOS (was skip: Platform.isIOS) - "initialize & cancelByUniqueName - iOS" now runs on iOS (was skip: Platform.isIOS) These logical errors were causing tests to be skipped when they should run, contributing to the "2 failed, 1 skipped" test results in CI. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 6de804f commit f26832c

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Install melos
1919
run: dart pub global activate melos
2020
- name: Bootstrap packages
21-
run: melos bootstrap
21+
run: melos bootstrap --sdk-path auto
2222
- name: Test
2323
run: |
2424
cd workmanager
@@ -35,7 +35,7 @@ jobs:
3535
- name: Install melos
3636
run: dart pub global activate melos
3737
- name: Bootstrap packages
38-
run: melos bootstrap
38+
run: melos bootstrap --sdk-path auto
3939
- name: Build iOS App
4040
run: cd example && flutter build ios --debug --no-codesign
4141
- name: Run native iOS tests
@@ -56,11 +56,14 @@ jobs:
5656
- name: Install melos
5757
run: dart pub global activate melos
5858
- name: Bootstrap packages
59-
run: melos bootstrap
59+
run: melos bootstrap --sdk-path auto
6060
- name: Build Android App
6161
run: cd example && flutter build apk --debug
6262
- name: Run native Android tests
63-
run: cd example/android && ./gradlew :workmanager_android:test
63+
run: |
64+
cd example/android
65+
./gradlew projects
66+
./gradlew test
6467
6568
drive_ios:
6669
strategy:
@@ -81,7 +84,7 @@ jobs:
8184
- name: Install melos
8285
run: dart pub global activate melos
8386
- name: Bootstrap packages
84-
run: melos bootstrap
87+
run: melos bootstrap --sdk-path auto
8588
# Run flutter integrate tests
8689
- name: Run Flutter integration tests
8790
run: cd example && flutter test integration_test/workmanager_integration_test.dart
@@ -114,7 +117,7 @@ jobs:
114117
- name: Install melos
115118
run: dart pub global activate melos
116119
- name: Bootstrap packages
117-
run: melos bootstrap
120+
run: melos bootstrap --sdk-path auto
118121
- name: Run Flutter Driver tests
119122
uses: reactivecircus/android-emulator-runner@v2
120123
with:
@@ -123,4 +126,8 @@ jobs:
123126
arch: x86_64
124127
disk-size: 6000M
125128
heap-size: 600M
126-
script: cd example && flutter test integration_test/workmanager_integration_test.dart
129+
script: |
130+
cd example
131+
flutter doctor -v
132+
flutter pub get
133+
flutter test integration_test/workmanager_integration_test.dart --verbose

example/integration_test/workmanager_integration_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void main() {
5353
rethrow;
5454
}
5555
}
56-
}, skip: Platform.isIOS);
56+
}, skip: !Platform.isIOS);
5757

5858
testWidgets('initialize & cancelByUniqueName - iOS',
5959
(WidgetTester tester) async {
@@ -73,5 +73,5 @@ void main() {
7373
rethrow;
7474
}
7575
}
76-
}, skip: Platform.isIOS);
76+
}, skip: !Platform.isIOS);
7777
}

0 commit comments

Comments
 (0)