diff --git a/.github/workflows/integration_test.yaml b/.github/workflows/integration_test.yaml index f91633d..23906b7 100644 --- a/.github/workflows/integration_test.yaml +++ b/.github/workflows/integration_test.yaml @@ -8,13 +8,14 @@ on: jobs: drive_android: + name: Android runs-on: ubuntu-latest timeout-minutes: 15 permissions: contents: read strategy: matrix: - api-level: [29, 35] + api-level: [29] fail-fast: false steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -41,12 +42,12 @@ jobs: drive_ios: name: iOS runs-on: macos-latest - timeout-minutes: 25 + timeout-minutes: 20 permissions: contents: read strategy: matrix: - simulator: [{os: "18.6", model: "iPhone SE (3rd generation)"}, {os: "26.1", model: "iPhone SE (3rd generation)"}] + simulator: [{os: "18.6", model: "iPhone SE (3rd generation)"}] fail-fast: false steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 @@ -82,3 +83,23 @@ jobs: - name: Run Flutter Integration tests working-directory: example run: flutter test integration_test -d macos + + drive_web: + name: Web + runs-on: ubuntu-latest + timeout-minutes: 15 + permissions: + contents: read + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 + with: + channel: stable + cache: true + - name: Setup chromedriver + run: | + npx @puppeteer/browsers install chromedriver@stable + chromedriver --port=4444 & + - name: Run Flutter Integration tests + working-directory: example + run: flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart -d web-server \ diff --git a/example/integration_test/app_test.dart b/example/integration_test/app_test.dart index 9734878..c56c4e8 100644 --- a/example/integration_test/app_test.dart +++ b/example/integration_test/app_test.dart @@ -1,10 +1,9 @@ -import 'package:flutter/foundation.dart' - show kIsWeb, defaultTargetPlatform, TargetPlatform; +import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:image/image.dart' as img; import 'package:integration_test/integration_test.dart'; import 'package:platform_image_converter/platform_image_converter.dart'; -import 'package:image/image.dart' as img; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -281,7 +280,7 @@ void main() { quality: 100, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }); @@ -318,7 +317,7 @@ void main() { quality: 50, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }, @@ -373,7 +372,7 @@ void main() { quality: 100, ), throwsA(isA()), - reason: 'WebP output is only supported on Android', + reason: 'WebP output is only supported on Android and Web.', ); } }); @@ -415,7 +414,7 @@ void main() { format: OutputFormat.webp, ), throwsA(isA()), - reason: 'WebP output should be unsupported on Web, iOS, and macOS', + reason: 'WebP output is not supported on this platform.', ); } }); diff --git a/example/test_driver/integration_test.dart b/example/test_driver/integration_test.dart index b38629c..172b4b7 100644 --- a/example/test_driver/integration_test.dart +++ b/example/test_driver/integration_test.dart @@ -1,3 +1,5 @@ import 'package:integration_test/integration_test_driver.dart'; -Future main() => integrationDriver(); +void main() async { + await integrationDriver(); +}