From 0501369107a6788d434a01952d0be2ca6a2c271d Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 09:48:40 +0200 Subject: [PATCH 01/32] ci: move to macOS 13 XL runner --- .github/workflows/e2e_tests.yaml | 6 +++--- .github/workflows/firebase_firestore.yaml | 4 ++-- .github/workflows/firebase_performance.yaml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 3ba4cf3b8d23..34350f36f8d4 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -26,7 +26,7 @@ on: jobs: android: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 45 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 @@ -112,7 +112,7 @@ jobs: ios: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 45 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 @@ -185,7 +185,7 @@ jobs: exit $FLUTTER_DRIVE_EXIT_CODE macos: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 45 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 8cdf16683db8..c09dd08816cd 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -23,7 +23,7 @@ env: jobs: android: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 @@ -60,7 +60,7 @@ jobs: script: ./.github/workflows/scripts/drive-example.sh android apple: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 35 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 diff --git a/.github/workflows/firebase_performance.yaml b/.github/workflows/firebase_performance.yaml index 49de8535292b..f218b1e4de87 100644 --- a/.github/workflows/firebase_performance.yaml +++ b/.github/workflows/firebase_performance.yaml @@ -27,7 +27,7 @@ env: jobs: android: if: github.event_name == 'pull_request' - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 @@ -52,7 +52,7 @@ jobs: script: ./.github/workflows/scripts/drive-example.sh android ios: - runs-on: macos-12 + runs-on: macos-13-xl timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 From 79b8bdf96c470db431a5c91d7b41d2b418e7c62f Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 10:06:07 +0200 Subject: [PATCH 02/32] ci: update iOS simulator --- .github/workflows/e2e_tests.yaml | 3 ++- .github/workflows/scripts/drive-example.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 34350f36f8d4..85d0b177de86 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -172,7 +172,8 @@ jobs: working-directory: tests run: | # Boot simulator and wait for System app to be ready. - SIMULATOR="iPhone 11" + # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators + SIMULATOR="iPhone 14" xcrun simctl bootstatus "$SIMULATOR" -b xcrun simctl logverbose "$SIMULATOR" enable # Sleep to allow simulator to settle. diff --git a/.github/workflows/scripts/drive-example.sh b/.github/workflows/scripts/drive-example.sh index 470070c65f59..2004a01b45ca 100755 --- a/.github/workflows/scripts/drive-example.sh +++ b/.github/workflows/scripts/drive-example.sh @@ -13,7 +13,7 @@ fi if [ "$ACTION" == "ios" ] then - SIMULATOR="iPhone 11" + SIMULATOR="iPhone 14" # Boot simulator and wait for System app to be ready. xcrun simctl bootstatus "$SIMULATOR" -b xcrun simctl logverbose "$SIMULATOR" enable From 3df055bf92e8bbc022905c87eea61d5cf5d2c5b0 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 10:10:46 +0200 Subject: [PATCH 03/32] ci: update iOS simulator --- .github/workflows/all_plugins.yaml | 14 +++++++------- .github/workflows/e2e_tests.yaml | 8 ++++---- .github/workflows/firebase_firestore.yaml | 6 +++--- .github/workflows/firebase_firestore_odm.yaml | 4 ++-- .github/workflows/firebase_performance.yaml | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/all_plugins.yaml b/.github/workflows/all_plugins.yaml index bf503c295399..0aa9bdcd195d 100644 --- a/.github/workflows/all_plugins.yaml +++ b/.github/workflows/all_plugins.yaml @@ -30,7 +30,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: 'Run Analyze' run: melos run analyze @@ -48,7 +48,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: 'Pub Check' run: | melos exec -c 1 --no-private --ignore="*example*" -- \ @@ -65,7 +65,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: 'Flutter Pub Get' run: | melos exec -c 1 --scope="*example*" -- \ @@ -82,7 +82,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - uses: Homebrew/actions/setup-homebrew@master - name: 'Install Tools' run: | @@ -115,7 +115,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: 'Build Examples' run: | melos exec -c 1 --scope="*example*" --dir-exists="web" -- \ @@ -132,7 +132,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: 'Flutter Test' run: melos run test --no-select - name: 'Flutter Test - Web' @@ -157,6 +157,6 @@ jobs: # Running `melos bootstrap` is not needed because we use Melos just # for the `check-license-header` script. run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: Check license header run: melos run check-license-header diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 85d0b177de86..bc138431ed80 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -73,7 +73,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Bootstrap package" run: melos bootstrap --scope tests - name: "Install Tools" @@ -149,7 +149,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Bootstrap package" run: melos bootstrap --scope tests - name: "Install Tools" @@ -224,7 +224,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Bootstrap package" run: melos bootstrap --scope tests - name: "Install Tools" @@ -271,7 +271,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Bootstrap package" run: melos bootstrap --scope tests - name: "Install Tools" diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index c09dd08816cd..0d4593de7fbf 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -40,7 +40,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Install Tools" run: | sudo npm i -g firebase-tools @@ -78,7 +78,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Install Tools" run: | sudo npm i -g firebase-tools @@ -113,7 +113,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Install Tools" run: | sudo npm i -g firebase-tools diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index ed0ac149a8cf..1869c5ebdb80 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -36,7 +36,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Bootstrap Workspace" run: | melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE" @@ -65,7 +65,7 @@ jobs: - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: run-bootstrap: false - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Install Tools" run: | sudo npm i -g firebase-tools diff --git a/.github/workflows/firebase_performance.yaml b/.github/workflows/firebase_performance.yaml index f218b1e4de87..982569a952ef 100644 --- a/.github/workflows/firebase_performance.yaml +++ b/.github/workflows/firebase_performance.yaml @@ -39,7 +39,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Build Example" run: ./.github/workflows/scripts/build-example.sh android - name: "Drive Example" @@ -64,7 +64,7 @@ jobs: cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: - melos-version: '3.0.0-dev.0' + melos-version: '3.0.1' - name: "Build Example" run: ./.github/workflows/scripts/build-example.sh ios - name: "Drive Example" From bf9357e293da021ec56fccc1524e19876d91966e Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 10:49:33 +0200 Subject: [PATCH 04/32] ci: move firebase_performance to main tests --- .github/workflows/firebase_performance.yaml | 71 --------------- .../integration_test/firebase_options.dart | 89 ------------------- tests/integration_test/e2e_test.dart | 3 + .../firebase_performance_e2e_test.dart | 3 +- tests/pubspec.yaml | 7 +- 5 files changed, 5 insertions(+), 168 deletions(-) delete mode 100644 .github/workflows/firebase_performance.yaml delete mode 100644 packages/firebase_performance/firebase_performance/example/integration_test/firebase_options.dart rename {packages/firebase_performance/firebase_performance/example/integration_test => tests/integration_test/firebase_performance}/firebase_performance_e2e_test.dart (99%) diff --git a/.github/workflows/firebase_performance.yaml b/.github/workflows/firebase_performance.yaml deleted file mode 100644 index 982569a952ef..000000000000 --- a/.github/workflows/firebase_performance.yaml +++ /dev/null @@ -1,71 +0,0 @@ -name: firebase_performance - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - pull_request: - paths: - - "packages/firebase_performance/**" - - ".github/workflows/firebase_performance.yaml" - # Ensure this workflow runs if the Firebase Android SDK version gets bumped. - - "packages/firebase_core/firebase_core/android/gradle.properties" - # Ensure this workflow runs if the Firebase iOS SDK version gets bumped. - - "packages/firebase_core/firebase_core/ios/firebase_sdk_version.rb" - push: - branches: - - master - paths-ignore: - - "docs/**" - - "**.md" - -env: - FLUTTERFIRE_PLUGIN_SCOPE: "*firebase_performance*" - FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*firebase_performance_example*" - -jobs: - android: - if: github.event_name == 'pull_request' - runs-on: macos-13-xl - timeout-minutes: 30 - steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - with: - fetch-depth: 0 - - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - with: - channel: 'stable' - cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a - with: - melos-version: '3.0.1' - - name: "Build Example" - run: ./.github/workflows/scripts/build-example.sh android - - name: "Drive Example" - uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 - with: - api-level: 28 - arch: x86_64 - target: google_apis - profile: Nexus 5X - script: ./.github/workflows/scripts/drive-example.sh android - - ios: - runs-on: macos-13-xl - timeout-minutes: 30 - steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - with: - fetch-depth: 0 - - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - with: - channel: 'stable' - cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a - with: - melos-version: '3.0.1' - - name: "Build Example" - run: ./.github/workflows/scripts/build-example.sh ios - - name: "Drive Example" - run: ./.github/workflows/scripts/drive-example.sh ios diff --git a/packages/firebase_performance/firebase_performance/example/integration_test/firebase_options.dart b/packages/firebase_performance/firebase_performance/example/integration_test/firebase_options.dart deleted file mode 100644 index bf7aa28e3827..000000000000 --- a/packages/firebase_performance/firebase_performance/example/integration_test/firebase_options.dart +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// File generated by FlutterFire CLI. -// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members -import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; -import 'package:flutter/foundation.dart' - show defaultTargetPlatform, kIsWeb, TargetPlatform; - -/// Default [FirebaseOptions] for use with your Firebase apps. -/// -/// Example: -/// ```dart -/// import 'firebase_options.dart'; -/// // ... -/// await Firebase.initializeApp( -/// options: DefaultFirebaseOptions.currentPlatform, -/// ); -/// ``` -class DefaultFirebaseOptions { - static FirebaseOptions get currentPlatform { - if (kIsWeb) { - return web; - } - switch (defaultTargetPlatform) { - case TargetPlatform.android: - return android; - case TargetPlatform.iOS: - return ios; - case TargetPlatform.macOS: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for macos - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.windows: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for windows - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - case TargetPlatform.linux: - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for linux - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); - default: - throw UnsupportedError( - 'DefaultFirebaseOptions are not supported for this platform.', - ); - } - } - - static const FirebaseOptions web = FirebaseOptions( - apiKey: 'AIzaSyB7wZb2tO1-Fs6GbDADUSTs2Qs3w08Hovw', - appId: '1:406099696497:web:87e25e51afe982cd3574d0', - messagingSenderId: '406099696497', - projectId: 'flutterfire-e2e-tests', - authDomain: 'flutterfire-e2e-tests.firebaseapp.com', - databaseURL: - 'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app', - storageBucket: 'flutterfire-e2e-tests.appspot.com', - measurementId: 'G-JN95N1JV2E', - ); - - static const FirebaseOptions android = FirebaseOptions( - apiKey: 'AIzaSyCdRjCVZlhrq72RuEklEyyxYlBRCYhI2Sw', - appId: '1:406099696497:android:0d4ed619c031c0ac3574d0', - messagingSenderId: '406099696497', - projectId: 'flutterfire-e2e-tests', - databaseURL: - 'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app', - storageBucket: 'flutterfire-e2e-tests.appspot.com', - ); - - static const FirebaseOptions ios = FirebaseOptions( - apiKey: 'AIzaSyDooSUGSf63Ghq02_iIhtnmwMDs4HlWS6c', - appId: '1:406099696497:ios:acd9c8e17b5e620e3574d0', - messagingSenderId: '406099696497', - projectId: 'flutterfire-e2e-tests', - databaseURL: - 'https://flutterfire-e2e-tests-default-rtdb.europe-west1.firebasedatabase.app', - storageBucket: 'flutterfire-e2e-tests.appspot.com', - androidClientId: - '406099696497-17qn06u8a0dc717u8ul7s49ampk13lul.apps.googleusercontent.com', - iosClientId: - '406099696497-mcs94a53ttg7ru556uec2hejel40ej7u.apps.googleusercontent.com', - iosBundleId: 'io.flutter.plugins.firebase.tests', - ); -} diff --git a/tests/integration_test/e2e_test.dart b/tests/integration_test/e2e_test.dart index 75e6da1fc5b5..fd0b4aa3689d 100644 --- a/tests/integration_test/e2e_test.dart +++ b/tests/integration_test/e2e_test.dart @@ -23,6 +23,8 @@ import 'firebase_messaging/firebase_messaging_e2e_test.dart' as firebase_messaging; import 'firebase_ml_model_downloader/firebase_ml_model_downloader_e2e_test.dart' as firebase_ml_model_downloader; +import 'firebase_performance/firebase_performance_e2e_test.dart' + as firebase_performance; import 'firebase_remote_config/firebase_remote_config_e2e_test.dart' as firebase_remote_config; import 'firebase_storage/firebase_storage_e2e_test.dart' as firebase_storage; @@ -42,6 +44,7 @@ void main() { firebase_dynamic_links.main(); firebase_messaging.main(); firebase_ml_model_downloader.main(); + firebase_performance.main(); firebase_remote_config.main(); firebase_storage.main(); }); diff --git a/packages/firebase_performance/firebase_performance/example/integration_test/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart similarity index 99% rename from packages/firebase_performance/firebase_performance/example/integration_test/firebase_performance_e2e_test.dart rename to tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 67e247495a1b..c9d0d4d6ae0c 100644 --- a/packages/firebase_performance/firebase_performance/example/integration_test/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -7,8 +7,7 @@ import 'package:firebase_performance/firebase_performance.dart'; import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; - -import 'firebase_options.dart'; +import 'package:tests/firebase_options.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); diff --git a/tests/pubspec.yaml b/tests/pubspec.yaml index 482b0f5c31f8..346bc12ecb0b 100644 --- a/tests/pubspec.yaml +++ b/tests/pubspec.yaml @@ -34,17 +34,12 @@ dependencies: firebase_database_web: ^0.2.2+1 firebase_dynamic_links: ^5.1.1 firebase_dynamic_links_platform_interface: ^0.2.4+1 - #firebase_in_app_messaging: any - #firebase_in_app_messaging_platform_interface: any firebase_messaging: ^14.4.1 firebase_messaging_platform_interface: ^4.3.1 firebase_messaging_web: ^3.3.1 firebase_ml_model_downloader: ^0.2.1+1 firebase_ml_model_downloader_platform_interface: ^0.1.2+1 - # TODO does not run on android without google services json due to com.google.firebase.perf.FirebasePerformanceInitializer.onAppColdStart - # firebase_performance: any - # firebase_performance_platform_interface: any - # firebase_performance_web: any + firebase_performance: ^0.9.1+1 firebase_remote_config: ^4.0.1 firebase_remote_config_platform_interface: ^1.2.1 firebase_remote_config_web: ^1.2.1 From b952e129382e905fa38131bc11e8a26760b3067b Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 11:07:38 +0200 Subject: [PATCH 05/32] ci: move firebase_performance to main tests --- .../firebase_performance/firebase_performance_e2e_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index c9d0d4d6ae0c..ead217e6f37e 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:io'; + import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_performance/firebase_performance.dart'; import 'package:flutter/foundation.dart' show kIsWeb; @@ -244,6 +246,6 @@ void main() { await testHttpMetric.stop(); }); }, - skip: kIsWeb, + skip: kIsWeb || Platform.isMacOS, ); } From 81bf47eeba06a7841bd442aa28428f4c91a4e3d2 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 11:15:47 +0200 Subject: [PATCH 06/32] ci: update flutter version for macos --- .github/workflows/e2e_tests.yaml | 3 +-- .github/workflows/firebase_firestore.yaml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index bc138431ed80..f8551398434a 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -218,8 +218,7 @@ jobs: restore-keys: firebase-emulators-v1 - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d with: - # TODO(Lyokone): upgrade to stable when https://github.com/flutter/flutter/issues/118469 is closed - flutter-version: '3.3.10' + channel: 'stable' cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 0d4593de7fbf..5a399f5ab37f 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -72,8 +72,7 @@ jobs: java-version: '11' - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d with: - # TODO(Lyokone): upgrade to stable when https://github.com/flutter/flutter/issues/118469 is closed - flutter-version: '3.3.10' + channel: 'stable' cache: true - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a with: From f4366a44a9b6aa300ae291480ac99175740247d4 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 11:31:19 +0200 Subject: [PATCH 07/32] ci: update flutter version for macos --- .../firebase_performance_e2e_test.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index ead217e6f37e..82b97614b185 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -2,11 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io'; - import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_performance/firebase_performance.dart'; -import 'package:flutter/foundation.dart' show kIsWeb; +import 'package:flutter/foundation.dart' + show TargetPlatform, defaultTargetPlatform, kIsWeb; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'package:tests/firebase_options.dart'; @@ -246,6 +245,6 @@ void main() { await testHttpMetric.stop(); }); }, - skip: kIsWeb || Platform.isMacOS, + skip: kIsWeb || defaultTargetPlatform == TargetPlatform.macOS, ); } From b5ce74365bb51526a6ebb2b21d21f46bd8b40edf Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 11:46:54 +0200 Subject: [PATCH 08/32] ci: tests --- .../firebase_performance_e2e_test.dart | 230 +++++++++--------- 1 file changed, 119 insertions(+), 111 deletions(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 82b97614b185..73b2c29bb4f2 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -19,118 +19,126 @@ void main() { ); }); - group('$FirebasePerformance.instance', () { - test('isPerformanceCollectionEnabled', () async { - FirebasePerformance performance = FirebasePerformance.instance; - - expect( - performance.isPerformanceCollectionEnabled(), - completion(isTrue), - ); - }); - test('setPerformanceCollectionEnabled', () async { - FirebasePerformance performance = FirebasePerformance.instance; - - await performance.setPerformanceCollectionEnabled(false); - expect( - performance.isPerformanceCollectionEnabled(), - completion(isFalse), - ); - }); - }); + group( + '$FirebasePerformance.instance', + () { + test('isPerformanceCollectionEnabled', () async { + FirebasePerformance performance = FirebasePerformance.instance; - group('$Trace', () { - late FirebasePerformance performance; - late Trace testTrace; - const String metricName = 'test-metric'; - - setUpAll(() async { - performance = FirebasePerformance.instance; - }); - - setUp(() async { - await performance.setPerformanceCollectionEnabled(true); - testTrace = performance.newTrace('test-trace'); - }); - - test('start & stop trace', () async { - await testTrace.start(); - await testTrace.stop(); - }); - - test('starting trace with performance collection disabled', () async { - await performance.setPerformanceCollectionEnabled(false); - await testTrace.start(); - await testTrace.stop(); - }); - - test("starting Trace twice shouldn't throw an error", () async { - await testTrace.start(); - await testTrace.start(); - }); - - test("stopping Trace twice shouldn't throw an error", () async { - await testTrace.start(); - await testTrace.stop(); - await testTrace.stop(); - }); - - test('incrementMetric works correctly', () { - testTrace.incrementMetric(metricName, 14); - expect(testTrace.getMetric(metricName), 14); - - testTrace.incrementMetric(metricName, 45); - expect(testTrace.getMetric(metricName), 59); - }); - - test('setMetric works correctly', () async { - testTrace.setMetric(metricName, 37); - expect(testTrace.getMetric(metricName), 37); - testTrace.setMetric(metricName, 3); - expect(testTrace.getMetric(metricName), 3); - }); - - test('putAttribute works correctly', () { - testTrace.putAttribute('apple', 'sauce'); - testTrace.putAttribute('banana', 'pie'); - - expect( - testTrace.getAttributes(), - {'apple': 'sauce', 'banana': 'pie'}, - ); - - testTrace.putAttribute('apple', 'sauce2'); - expect( - testTrace.getAttributes(), - {'apple': 'sauce2', 'banana': 'pie'}, - ); - }); - - test('removeAttribute works correctly', () { - testTrace.putAttribute('sponge', 'bob'); - testTrace.putAttribute('patrick', 'star'); - testTrace.removeAttribute('sponge'); - - expect( - testTrace.getAttributes(), - {'patrick': 'star'}, - ); - - testTrace.removeAttribute('sponge'); - - expect( - testTrace.getAttributes(), - {'patrick': 'star'}, - ); - }); - - test('getAttribute', () async { - testTrace.putAttribute('yugi', 'oh'); - - expect(testTrace.getAttribute('yugi'), equals('oh')); - expect(testTrace.getAttribute('yugi'), equals('oh')); - }); - }); + expect( + performance.isPerformanceCollectionEnabled(), + completion(isTrue), + ); + }); + test('setPerformanceCollectionEnabled', () async { + FirebasePerformance performance = FirebasePerformance.instance; + + await performance.setPerformanceCollectionEnabled(false); + expect( + performance.isPerformanceCollectionEnabled(), + completion(isFalse), + ); + }); + }, + skip: kIsWeb || defaultTargetPlatform == TargetPlatform.macOS, + ); + + group( + '$Trace', + () { + late FirebasePerformance performance; + late Trace testTrace; + const String metricName = 'test-metric'; + + setUpAll(() async { + performance = FirebasePerformance.instance; + }); + + setUp(() async { + await performance.setPerformanceCollectionEnabled(true); + testTrace = performance.newTrace('test-trace'); + }); + + test('start & stop trace', () async { + await testTrace.start(); + await testTrace.stop(); + }); + + test('starting trace with performance collection disabled', () async { + await performance.setPerformanceCollectionEnabled(false); + await testTrace.start(); + await testTrace.stop(); + }); + + test("starting Trace twice shouldn't throw an error", () async { + await testTrace.start(); + await testTrace.start(); + }); + + test("stopping Trace twice shouldn't throw an error", () async { + await testTrace.start(); + await testTrace.stop(); + await testTrace.stop(); + }); + + test('incrementMetric works correctly', () { + testTrace.incrementMetric(metricName, 14); + expect(testTrace.getMetric(metricName), 14); + + testTrace.incrementMetric(metricName, 45); + expect(testTrace.getMetric(metricName), 59); + }); + + test('setMetric works correctly', () async { + testTrace.setMetric(metricName, 37); + expect(testTrace.getMetric(metricName), 37); + testTrace.setMetric(metricName, 3); + expect(testTrace.getMetric(metricName), 3); + }); + + test('putAttribute works correctly', () { + testTrace.putAttribute('apple', 'sauce'); + testTrace.putAttribute('banana', 'pie'); + + expect( + testTrace.getAttributes(), + {'apple': 'sauce', 'banana': 'pie'}, + ); + + testTrace.putAttribute('apple', 'sauce2'); + expect( + testTrace.getAttributes(), + {'apple': 'sauce2', 'banana': 'pie'}, + ); + }); + + test('removeAttribute works correctly', () { + testTrace.putAttribute('sponge', 'bob'); + testTrace.putAttribute('patrick', 'star'); + testTrace.removeAttribute('sponge'); + + expect( + testTrace.getAttributes(), + {'patrick': 'star'}, + ); + + testTrace.removeAttribute('sponge'); + + expect( + testTrace.getAttributes(), + {'patrick': 'star'}, + ); + }); + + test('getAttribute', () async { + testTrace.putAttribute('yugi', 'oh'); + + expect(testTrace.getAttribute('yugi'), equals('oh')); + expect(testTrace.getAttribute('yugi'), equals('oh')); + }); + }, + skip: kIsWeb || defaultTargetPlatform == TargetPlatform.macOS, + ); group( '$HttpMetric', From c730f3b42fc736c4a2ce8b2d0169e6817697501f Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 13:58:03 +0200 Subject: [PATCH 09/32] ci: tests --- .../firebase_performance/example/android/build.gradle | 2 +- tests/android/build.gradle | 5 +++-- tests/android/gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/firebase_performance/firebase_performance/example/android/build.gradle b/packages/firebase_performance/firebase_performance/example/android/build.gradle index 9dc63c2583fc..e16321558424 100644 --- a/packages/firebase_performance/firebase_performance/example/android/build.gradle +++ b/packages/firebase_performance/firebase_performance/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.google.gms:google-services:4.3.4' - classpath 'com.google.firebase:perf-plugin:1.3.2' + classpath 'com.google.firebase:perf-plugin:1.4.2' } } diff --git a/tests/android/build.gradle b/tests/android/build.gradle index 9fb08b6a24e4..732b266aec33 100644 --- a/tests/android/build.gradle +++ b/tests/android/build.gradle @@ -6,9 +6,10 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.android.tools.build:gradle:7.4.2' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' + classpath 'com.google.firebase:perf-plugin:1.4.2' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } diff --git a/tests/android/gradle/wrapper/gradle-wrapper.properties b/tests/android/gradle/wrapper/gradle-wrapper.properties index b8793d3c0d69..6b665338b34e 100644 --- a/tests/android/gradle/wrapper/gradle-wrapper.properties +++ b/tests/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip From 7bbad525f46dc858d7c7786220acff84eee75437 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 14:36:51 +0200 Subject: [PATCH 10/32] ci: tests --- .github/workflows/firebase_firestore.yaml | 2 +- .github/workflows/firebase_firestore_odm.yaml | 4 ++-- .../android/app/src/main/AndroidManifest.xml | 3 +++ .../firebase_performance_e2e_test.dart | 21 ++++++++++++------- 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 5a399f5ab37f..fb23ac57ecd1 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -96,7 +96,7 @@ jobs: web: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index 1869c5ebdb80..98bb73e553d9 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -24,7 +24,7 @@ env: jobs: test: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: @@ -49,7 +49,7 @@ jobs: integration_test: runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 30 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: diff --git a/tests/android/app/src/main/AndroidManifest.xml b/tests/android/app/src/main/AndroidManifest.xml index e0e913ad2a70..d0ed5d7d4b61 100644 --- a/tests/android/app/src/main/AndroidManifest.xml +++ b/tests/android/app/src/main/AndroidManifest.xml @@ -30,5 +30,8 @@ + diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 73b2c29bb4f2..ccefd16c6d1b 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -22,14 +22,19 @@ void main() { group( '$FirebasePerformance.instance', () { - test('isPerformanceCollectionEnabled', () async { - FirebasePerformance performance = FirebasePerformance.instance; - - expect( - performance.isPerformanceCollectionEnabled(), - completion(isTrue), - ); - }); + test( + 'isPerformanceCollectionEnabled', + () async { + FirebasePerformance performance = FirebasePerformance.instance; + + expect( + performance.isPerformanceCollectionEnabled(), + completion(isTrue), + ); + }, + // Works locally but fails on CI + skip: defaultTargetPlatform == TargetPlatform.android, + ); test('setPerformanceCollectionEnabled', () async { FirebasePerformance performance = FirebasePerformance.instance; From dee7be2bc63fe757cebf359f7a270f63147f967e Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 14:56:27 +0200 Subject: [PATCH 11/32] ci: tests --- .../firebase_performance/firebase_performance_e2e_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index ccefd16c6d1b..75099753b039 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -33,7 +33,8 @@ void main() { ); }, // Works locally but fails on CI - skip: defaultTargetPlatform == TargetPlatform.android, + skip: defaultTargetPlatform == TargetPlatform.android || + defaultTargetPlatform == TargetPlatform.macOS, ); test('setPerformanceCollectionEnabled', () async { FirebasePerformance performance = FirebasePerformance.instance; From a0a980b014b03577d36f1efb1dfa626f6bc45fba Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 15:23:40 +0200 Subject: [PATCH 12/32] ci: tests --- .../firebase_performance_e2e_test.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 75099753b039..927c633f28bb 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -17,6 +17,11 @@ void main() { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); + + // There is cold start overhead for the first trace on Android. + if (defaultTargetPlatform == TargetPlatform.android) { + await Future.delayed(const Duration(seconds: 5)); + } }); group( @@ -33,8 +38,7 @@ void main() { ); }, // Works locally but fails on CI - skip: defaultTargetPlatform == TargetPlatform.android || - defaultTargetPlatform == TargetPlatform.macOS, + skip: defaultTargetPlatform == TargetPlatform.android, ); test('setPerformanceCollectionEnabled', () async { FirebasePerformance performance = FirebasePerformance.instance; From 09189b35c0b2b3d2c2e33ae3624a8d88765c0bd4 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 15:39:27 +0200 Subject: [PATCH 13/32] ci: tests --- .../firebase_performance/firebase_performance_e2e_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 927c633f28bb..95fb8ce755bf 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -38,7 +38,7 @@ void main() { ); }, // Works locally but fails on CI - skip: defaultTargetPlatform == TargetPlatform.android, + skip: defaultTargetPlatform == TargetPlatform.macOS, ); test('setPerformanceCollectionEnabled', () async { FirebasePerformance performance = FirebasePerformance.instance; From 9819327656773576ebef1f003b712364571380c1 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Tue, 25 Apr 2023 16:04:30 +0200 Subject: [PATCH 14/32] ci: tests --- .../firebase_performance_e2e_test.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart index 95fb8ce755bf..75099753b039 100644 --- a/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart +++ b/tests/integration_test/firebase_performance/firebase_performance_e2e_test.dart @@ -17,11 +17,6 @@ void main() { await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); - - // There is cold start overhead for the first trace on Android. - if (defaultTargetPlatform == TargetPlatform.android) { - await Future.delayed(const Duration(seconds: 5)); - } }); group( @@ -38,7 +33,8 @@ void main() { ); }, // Works locally but fails on CI - skip: defaultTargetPlatform == TargetPlatform.macOS, + skip: defaultTargetPlatform == TargetPlatform.android || + defaultTargetPlatform == TargetPlatform.macOS, ); test('setPerformanceCollectionEnabled', () async { FirebasePerformance performance = FirebasePerformance.instance; From 42c93c1bf6af478c74d037ff8720d76868daf312 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 09:01:06 +0200 Subject: [PATCH 15/32] ci: tests --- .github/workflows/firebase_firestore.yaml | 21 ++++++++++++++++--- .github/workflows/firebase_firestore_odm.yaml | 21 ++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index fb23ac57ecd1..6b114f7032ad 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -96,11 +96,15 @@ jobs: web: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 15 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: fetch-depth: 0 + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c + name: Install Node.js 16 + with: + node-version: "16" - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 with: distribution: 'temurin' @@ -118,5 +122,16 @@ jobs: sudo npm i -g firebase-tools - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "Drive Example" - run: ./.github/workflows/scripts/drive-example.sh web + - name: "E2E Tests" + working-directory: packages/cloud_firestore/cloud_firestore/example + # Web devices are not supported for the `flutter test` command yet. As a + # workaround we can use the `flutter drive` command. Tracking issue: + # https://github.com/flutter/flutter/issues/66264 + run: | + chromedriver --port=4444 & + flutter drive \ + --verbose-system-logs \ + -d web-server \ + --driver=test_driver/integration_test.dart \ + --target=integration_test/cloud_firestore_e2e_test.dart \ + --dart-define=CI=true diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index 98bb73e553d9..24444046b32c 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -49,11 +49,15 @@ jobs: integration_test: runs-on: ubuntu-latest - timeout-minutes: 30 + timeout-minutes: 15 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: fetch-depth: 0 + - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c + name: Install Node.js 16 + with: + node-version: "16" - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 with: distribution: 'temurin' @@ -76,5 +80,16 @@ jobs: melos run odm:generator_test_build_runner:build - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "Drive Example" - run: ./.github/workflows/scripts/drive-example.sh web + - name: "E2E Tests" + working-directory: packages/cloud_firestore_odm/cloud_firestore_odm/example + # Web devices are not supported for the `flutter test` command yet. As a + # workaround we can use the `flutter drive` command. Tracking issue: + # https://github.com/flutter/flutter/issues/66264 + run: | + chromedriver --port=4444 & + flutter drive \ + --verbose-system-logs \ + -d web-server \ + --driver=test_driver/integration_test.dart \ + --target=integration_test/cloud_firestore_odm_e2e_test.dart \ + --dart-define=CI=true From 19e56e089b6b94cb632f99bb3be2ac0f5fd88cfe Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 09:28:27 +0200 Subject: [PATCH 16/32] ci: tests --- .github/workflows/e2e_tests.yaml | 8 ++++---- .github/workflows/firebase_firestore.yaml | 6 +++--- .github/workflows/firebase_firestore_odm.yaml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index f8551398434a..a94c8b7290f1 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -78,7 +78,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Build Application" working-directory: tests run: | @@ -154,7 +154,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Build Application" working-directory: tests run: | @@ -228,7 +228,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Build Application" working-directory: tests run: | @@ -275,7 +275,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: Cache Firebase Emulator uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 with: diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 6b114f7032ad..73444d0a7c23 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -43,7 +43,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Build Example" run: ./.github/workflows/scripts/build-example.sh android - name: Start Firebase Emulator @@ -80,7 +80,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Build iOS Example" run: ./.github/workflows/scripts/build-example.sh ios - name: Start Firebase Emulator @@ -119,7 +119,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index 24444046b32c..a08d5cb5a979 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -72,7 +72,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools + sudo npm i -g firebase-tools@11.24.1 - name: "Bootstrap Workspace" run: | melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE" From 25f0021dbcfb2b9e8ae70adf0ff395d7dcdaab7c Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 10:38:14 +0200 Subject: [PATCH 17/32] ci: tests --- .github/workflows/firebase_firestore.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 73444d0a7c23..10d279ff0898 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -24,7 +24,7 @@ env: jobs: android: runs-on: macos-13-xl - timeout-minutes: 30 + timeout-minutes: 45 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: @@ -61,7 +61,7 @@ jobs: apple: runs-on: macos-13-xl - timeout-minutes: 35 + timeout-minutes: 45 steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 with: From 8af293a6ab30fd739dcde2930ccad2e81812b566 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 13:59:02 +0200 Subject: [PATCH 18/32] ci: tests --- .github/workflows/e2e_tests.yaml | 12 ++-- .github/workflows/firebase_firestore.yaml | 57 ++++++++++++------- .github/workflows/firebase_firestore_odm.yaml | 2 +- docs/crashlytics/_deobfuscated.md | 2 +- .../example/android/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 3 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- .../example/android/build.gradle | 2 +- 23 files changed, 65 insertions(+), 51 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index a94c8b7290f1..c95a051bca32 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -78,11 +78,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 - - name: "Build Application" - working-directory: tests - run: | - flutter build apk --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true --no-android-gradle-daemon + sudo npm i -g firebase-tools@11.28.0 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" @@ -154,7 +150,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 + sudo npm i -g firebase-tools@11.28.0 - name: "Build Application" working-directory: tests run: | @@ -228,7 +224,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 + sudo npm i -g firebase-tools@11.28.0 - name: "Build Application" working-directory: tests run: | @@ -275,7 +271,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 + sudo npm i -g firebase-tools@11.28.0 - name: Cache Firebase Emulator uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 with: diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 10d279ff0898..6a45b5163f12 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -43,21 +43,22 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 - - name: "Build Example" - run: ./.github/workflows/scripts/build-example.sh android + sudo npm i -g firebase-tools@11.28.0 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "Drive Example" + - name: "E2E Tests" uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 + timeout-minutes: 30 with: - api-level: 28 + api-level: 30 arch: x86_64 - # Firebase Firestore works without Google Play Services, so we don't use the `googleapis` - # emulator target as it's considerably slower on CI. - target: default + target: google_apis profile: Nexus 5X - script: ./.github/workflows/scripts/drive-example.sh android + working-directory: packages/cloud_firestore/cloud_firestore/example + script: | + sleep 15 + $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & + flutter test integration_test/cloud_firestore_e2e_test.dart --dart-define=CI=true apple: runs-on: macos-13-xl @@ -80,19 +81,37 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 - - name: "Build iOS Example" - run: ./.github/workflows/scripts/build-example.sh ios + sudo npm i -g firebase-tools@11.28.0 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "Drive iOS Example" - run: ./.github/workflows/scripts/drive-example.sh ios - - name: "Build MacOS Example" - run: ./.github/workflows/scripts/build-example.sh macos + - name: "iOS E2E Tests" + working-directory: tests + run: | + # Boot simulator and wait for System app to be ready. + # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators + SIMULATOR="iPhone 14" + xcrun simctl bootstatus "$SIMULATOR" -b + xcrun simctl logverbose "$SIMULATOR" enable + # Sleep to allow simulator to settle. + sleep 15 + # Uncomment following line to have simulator logs printed out for debugging purposes. + # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & + flutter test integration_test/cloud_firestore_e2e_test.dart -d "$SIMULATOR" --dart-define=CI=true + FLUTTER_DRIVE_EXIT_CODE=$? + xcrun simctl shutdown "$SIMULATOR" + exit $FLUTTER_DRIVE_EXIT_CODE - name: "Reset Firestore Emulator" run: cd ./.github/workflows/scripts && ./reset-firestore-emulator.sh - - name: "Drive MacOS Example" - run: ./.github/workflows/scripts/drive-example.sh macos + - name: "macOS E2E Tests" + working-directory: tests + run: | + sleep 15 + # Uncomment following line to have simulator logs printed out for debugging purposes. + # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & + flutter test integration_test/cloud_firestore_e2e_test.dart -d "macos" --dart-define=CI=true + FLUTTER_DRIVE_EXIT_CODE=$? + xcrun simctl shutdown "$SIMULATOR" + exit $FLUTTER_DRIVE_EXIT_CODE web: runs-on: ubuntu-latest @@ -119,7 +138,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 + sudo npm i -g firebase-tools@11.28.0 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index a08d5cb5a979..1cf861730bec 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -72,7 +72,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.24.1 + sudo npm i -g firebase-tools@11.28.0 - name: "Bootstrap Workspace" run: | melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE" diff --git a/docs/crashlytics/_deobfuscated.md b/docs/crashlytics/_deobfuscated.md index ad1d03765c1e..f4911229e831 100644 --- a/docs/crashlytics/_deobfuscated.md +++ b/docs/crashlytics/_deobfuscated.md @@ -119,7 +119,7 @@ and in the app-level `build.gradle`: dependencies { // ... other dependencies - classpath 'com.google.gms:google-services:4.3.5' + classpath 'com.google.gms:google-services:4.3.15' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' } diff --git a/packages/cloud_firestore/cloud_firestore/example/android/build.gradle b/packages/cloud_firestore/cloud_firestore/example/android/build.gradle index 111a07244817..a6ecb5002903 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/build.gradle +++ b/packages/cloud_firestore/cloud_firestore/example/android/build.gradle @@ -1,14 +1,14 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.6.21' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:7.4.2' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } diff --git a/packages/cloud_firestore/cloud_firestore/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/cloud_firestore/cloud_firestore/example/android/gradle/wrapper/gradle-wrapper.properties index bc6a58afdda2..8049c684f04f 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/cloud_firestore/cloud_firestore/example/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Fri Jun 23 08:50:38 CEST 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip diff --git a/packages/cloud_functions/cloud_functions/example/android/build.gradle b/packages/cloud_functions/cloud_functions/example/android/build.gradle index 0c7aa9240ce0..1cbfc0b742f9 100644 --- a/packages/cloud_functions/cloud_functions/example/android/build.gradle +++ b/packages/cloud_functions/cloud_functions/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_analytics/firebase_analytics/example/android/build.gradle b/packages/firebase_analytics/firebase_analytics/example/android/build.gradle index bc864f6fe6c8..e609cf43aa0e 100755 --- a/packages/firebase_analytics/firebase_analytics/example/android/build.gradle +++ b/packages/firebase_analytics/firebase_analytics/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_app_check/firebase_app_check/example/android/build.gradle b/packages/firebase_app_check/firebase_app_check/example/android/build.gradle index c613764dffda..e4f3ab71381d 100644 --- a/packages/firebase_app_check/firebase_app_check/example/android/build.gradle +++ b/packages/firebase_app_check/firebase_app_check/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.3' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.13' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration } } diff --git a/packages/firebase_app_installations/firebase_app_installations/example/android/build.gradle b/packages/firebase_app_installations/firebase_app_installations/example/android/build.gradle index e3678944a0aa..75ffed7db07b 100644 --- a/packages/firebase_app_installations/firebase_app_installations/example/android/build.gradle +++ b/packages/firebase_app_installations/firebase_app_installations/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.google.gms:google-services:4.3.8' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_auth/firebase_auth/example/android/build.gradle b/packages/firebase_auth/firebase_auth/example/android/build.gradle index 759ba73143c7..d71c9cdf13e3 100644 --- a/packages/firebase_auth/firebase_auth/example/android/build.gradle +++ b/packages/firebase_auth/firebase_auth/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.8' + classpath 'com.google.gms:google-services:4.3.15' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/packages/firebase_crashlytics/firebase_crashlytics/example/android/build.gradle b/packages/firebase_crashlytics/firebase_crashlytics/example/android/build.gradle index e7032034e765..d03a05cf0366 100644 --- a/packages/firebase_crashlytics/firebase_crashlytics/example/android/build.gradle +++ b/packages/firebase_crashlytics/firebase_crashlytics/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1' } } diff --git a/packages/firebase_database/firebase_database/example/android/build.gradle b/packages/firebase_database/firebase_database/example/android/build.gradle index 0c7aa9240ce0..1cbfc0b742f9 100755 --- a/packages/firebase_database/firebase_database/example/android/build.gradle +++ b/packages/firebase_database/firebase_database/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_dynamic_links/firebase_dynamic_links/example/android/build.gradle b/packages/firebase_dynamic_links/firebase_dynamic_links/example/android/build.gradle index 649f806eb474..238f9f68409a 100644 --- a/packages/firebase_dynamic_links/firebase_dynamic_links/example/android/build.gradle +++ b/packages/firebase_dynamic_links/firebase_dynamic_links/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/android/build.gradle b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/android/build.gradle index a18a8990e1ff..61a89ccc807e 100644 --- a/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/android/build.gradle +++ b/packages/firebase_in_app_messaging/firebase_in_app_messaging/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.8' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_messaging/firebase_messaging/example/android/build.gradle b/packages/firebase_messaging/firebase_messaging/example/android/build.gradle index 2d161d7b39ab..63cb271521a7 100644 --- a/packages/firebase_messaging/firebase_messaging/example/android/build.gradle +++ b/packages/firebase_messaging/firebase_messaging/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.2.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/android/build.gradle b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/android/build.gradle index eb05d02c35e7..91a4b6b81355 100644 --- a/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/android/build.gradle +++ b/packages/firebase_ml_model_downloader/firebase_ml_model_downloader/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.0' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration } } diff --git a/packages/firebase_performance/firebase_performance/example/android/build.gradle b/packages/firebase_performance/firebase_performance/example/android/build.gradle index e16321558424..9b850a39b774 100644 --- a/packages/firebase_performance/firebase_performance/example/android/build.gradle +++ b/packages/firebase_performance/firebase_performance/example/android/build.gradle @@ -7,7 +7,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' classpath 'com.google.firebase:perf-plugin:1.4.2' } } diff --git a/packages/firebase_remote_config/firebase_remote_config/example/android/build.gradle b/packages/firebase_remote_config/firebase_remote_config/example/android/build.gradle index 0c7aa9240ce0..1cbfc0b742f9 100644 --- a/packages/firebase_remote_config/firebase_remote_config/example/android/build.gradle +++ b/packages/firebase_remote_config/firebase_remote_config/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_storage/firebase_storage/example/android/build.gradle b/packages/firebase_storage/firebase_storage/example/android/build.gradle index 0c7aa9240ce0..1cbfc0b742f9 100755 --- a/packages/firebase_storage/firebase_storage/example/android/build.gradle +++ b/packages/firebase_storage/firebase_storage/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.2' - classpath 'com.google.gms:google-services:4.3.4' + classpath 'com.google.gms:google-services:4.3.15' } } diff --git a/packages/firebase_ui_database/example/android/build.gradle b/packages/firebase_ui_database/example/android/build.gradle index 9192654d01cc..8eeefe96b754 100644 --- a/packages/firebase_ui_database/example/android/build.gradle +++ b/packages/firebase_ui_database/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.2' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } diff --git a/packages/firebase_ui_firestore/example/android/build.gradle b/packages/firebase_ui_firestore/example/android/build.gradle index 9192654d01cc..8eeefe96b754 100644 --- a/packages/firebase_ui_firestore/example/android/build.gradle +++ b/packages/firebase_ui_firestore/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.1.2' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } diff --git a/packages/firebase_ui_oauth/example/android/build.gradle b/packages/firebase_ui_oauth/example/android/build.gradle index 111a07244817..ec3dda306a80 100644 --- a/packages/firebase_ui_oauth/example/android/build.gradle +++ b/packages/firebase_ui_oauth/example/android/build.gradle @@ -8,7 +8,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:4.1.0' // START: FlutterFire Configuration - classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.gms:google-services:4.3.15' // END: FlutterFire Configuration classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } From 99c55efb64c070a786d21850c496eb77f363cfd0 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 14:05:29 +0200 Subject: [PATCH 19/32] ci: tests --- .github/workflows/firebase_firestore.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 6a45b5163f12..2c7eac9360ee 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -85,7 +85,7 @@ jobs: - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "iOS E2E Tests" - working-directory: tests + working-directory: packages/cloud_firestore/cloud_firestore/example run: | # Boot simulator and wait for System app to be ready. # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators @@ -103,7 +103,7 @@ jobs: - name: "Reset Firestore Emulator" run: cd ./.github/workflows/scripts && ./reset-firestore-emulator.sh - name: "macOS E2E Tests" - working-directory: tests + working-directory: packages/cloud_firestore/cloud_firestore/example run: | sleep 15 # Uncomment following line to have simulator logs printed out for debugging purposes. From b40e1f42e9cfb83610167b525ac6ed0c797303b4 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 14:12:18 +0200 Subject: [PATCH 20/32] ci: tests --- .github/workflows/firebase_firestore.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 2c7eac9360ee..7134c5e5b035 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -110,7 +110,6 @@ jobs: # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & flutter test integration_test/cloud_firestore_e2e_test.dart -d "macos" --dart-define=CI=true FLUTTER_DRIVE_EXIT_CODE=$? - xcrun simctl shutdown "$SIMULATOR" exit $FLUTTER_DRIVE_EXIT_CODE web: From dc5213d0a7af024c71b0a4c57bfb49a5975b99d8 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 14:59:16 +0200 Subject: [PATCH 21/32] ci: tests --- .github/workflows/e2e_tests.yaml | 15 +- .github/workflows/firebase_firestore.yaml | 340 ++++++++++-------- ..._firestore_e2e_test.dart => e2e_test.dart} | 0 3 files changed, 200 insertions(+), 155 deletions(-) rename packages/cloud_firestore/cloud_firestore/example/integration_test/{cloud_firestore_e2e_test.dart => e2e_test.dart} (100%) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index c95a051bca32..0de37271ef7f 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -25,6 +25,9 @@ on: - "**.md" jobs: + strategy: + matrix: + working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] android: runs-on: macos-13-xl timeout-minutes: 45 @@ -89,7 +92,7 @@ jobs: arch: x86_64 target: google_apis profile: Nexus 5X - working-directory: tests + working-directory: ${{ matrix.working_directory }} script: | sleep 15 $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & @@ -152,7 +155,7 @@ jobs: run: | sudo npm i -g firebase-tools@11.28.0 - name: "Build Application" - working-directory: tests + working-directory: ${{ matrix.working_directory }} run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros @@ -165,7 +168,7 @@ jobs: - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" - working-directory: tests + working-directory: ${{ matrix.working_directory }} run: | # Boot simulator and wait for System app to be ready. # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators @@ -226,7 +229,7 @@ jobs: run: | sudo npm i -g firebase-tools@11.28.0 - name: "Build Application" - working-directory: tests + working-directory: ${{ matrix.working_directory }} run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros @@ -239,7 +242,7 @@ jobs: - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" - working-directory: tests + working-directory: ${{ matrix.working_directory }} run: | flutter test \ integration_test/e2e_test.dart \ @@ -281,7 +284,7 @@ jobs: - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: "E2E Tests" - working-directory: tests + working-directory: ${{ matrix.working_directory }} # Web devices are not supported for the `flutter test` command yet. As a # workaround we can use the `flutter drive` command. Tracking issue: # https://github.com/flutter/flutter/issues/66264 diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml index 7134c5e5b035..ed5f7649acfb 100644 --- a/.github/workflows/firebase_firestore.yaml +++ b/.github/workflows/firebase_firestore.yaml @@ -1,155 +1,197 @@ -name: firebase_firestore +# name: firebase_firestore -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true +# concurrency: +# group: ${{ github.workflow }}-${{ github.ref }} +# cancel-in-progress: true -on: - pull_request: - paths: - - "packages/firebase_core/**" - - "packages/cloud_firestore/**" - - ".github/workflows/firebase_firestore.yaml" - push: - branches: - - master - paths-ignore: - - "docs/**" - - "**.md" +# on: +# pull_request: +# paths: +# - "packages/firebase_core/**" +# - "packages/cloud_firestore/**" +# - ".github/workflows/firebase_firestore.yaml" +# push: +# branches: +# - master +# paths-ignore: +# - "docs/**" +# - "**.md" -env: - FLUTTERFIRE_PLUGIN_SCOPE: "*cloud_firestore*" - FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*cloud_firestore_example*" +# env: +# FLUTTERFIRE_PLUGIN_SCOPE: "*cloud_firestore*" +# FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*cloud_firestore_example*" -jobs: - android: - runs-on: macos-13-xl - timeout-minutes: 45 - steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - with: - fetch-depth: 0 - - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 - with: - distribution: 'temurin' - java-version: '11' - - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - with: - channel: 'stable' - cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a - with: - run-bootstrap: false - melos-version: '3.0.1' - - name: "Install Tools" - run: | - sudo npm i -g firebase-tools@11.28.0 - - name: Start Firebase Emulator - run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "E2E Tests" - uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 - timeout-minutes: 30 - with: - api-level: 30 - arch: x86_64 - target: google_apis - profile: Nexus 5X - working-directory: packages/cloud_firestore/cloud_firestore/example - script: | - sleep 15 - $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & - flutter test integration_test/cloud_firestore_e2e_test.dart --dart-define=CI=true +# jobs: +# android: +# runs-on: macos-13-xl +# timeout-minutes: 45 +# steps: +# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 +# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c +# name: Install Node.js 16 +# with: +# node-version: "16" +# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 +# with: +# distribution: "temurin" +# java-version: "11" +# - uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 +# name: Gradle Cache +# with: +# path: ~/.gradle/caches +# key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }} +# restore-keys: ${{ runner.os }}-gradle-v2 +# - uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 +# id: avd-cache +# with: +# path: | +# ~/.android/avd/* +# ~/.android/adb* +# key: avd +# - name: Generate AVD snapshot for caching +# if: steps.avd-cache.outputs.cache-hit != 'true' +# uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 +# with: +# api-level: 30 +# arch: x86_64 +# target: google_apis +# profile: Nexus 5X +# script: echo "Generated AVD snapshot for caching" +# - name: Firebase Emulator Cache +# uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 +# with: +# path: ~/.cache/firebase/emulators +# key: firebase-emulators-v2-${{ github.run_id }} +# restore-keys: firebase-emulators-v2 +# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d +# with: +# channel: 'stable' +# cache: true +# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a +# with: +# run-bootstrap: false +# melos-version: '3.0.1' +# - name: "Install Tools" +# run: | +# sudo npm i -g firebase-tools@11.28.0 +# - name: Start Firebase Emulator +# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh +# - name: "E2E Tests" +# uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 +# timeout-minutes: 30 +# with: +# api-level: 30 +# arch: x86_64 +# target: google_apis +# profile: Nexus 5X +# working-directory: packages/cloud_firestore/cloud_firestore/example +# script: | +# sleep 15 +# $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & +# flutter test integration_test/cloud_firestore_e2e_test.dart --dart-define=CI=true +# - name: Compress Emulator Log +# if: always() +# run: cd tests/ && gzip -9 adb-log.txt +# shell: bash - apple: - runs-on: macos-13-xl - timeout-minutes: 45 - steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - with: - fetch-depth: 0 - - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 - with: - distribution: 'temurin' - java-version: '11' - - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - with: - channel: 'stable' - cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a - with: - run-bootstrap: false - melos-version: '3.0.1' - - name: "Install Tools" - run: | - sudo npm i -g firebase-tools@11.28.0 - - name: Start Firebase Emulator - run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "iOS E2E Tests" - working-directory: packages/cloud_firestore/cloud_firestore/example - run: | - # Boot simulator and wait for System app to be ready. - # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators - SIMULATOR="iPhone 14" - xcrun simctl bootstatus "$SIMULATOR" -b - xcrun simctl logverbose "$SIMULATOR" enable - # Sleep to allow simulator to settle. - sleep 15 - # Uncomment following line to have simulator logs printed out for debugging purposes. - # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & - flutter test integration_test/cloud_firestore_e2e_test.dart -d "$SIMULATOR" --dart-define=CI=true - FLUTTER_DRIVE_EXIT_CODE=$? - xcrun simctl shutdown "$SIMULATOR" - exit $FLUTTER_DRIVE_EXIT_CODE - - name: "Reset Firestore Emulator" - run: cd ./.github/workflows/scripts && ./reset-firestore-emulator.sh - - name: "macOS E2E Tests" - working-directory: packages/cloud_firestore/cloud_firestore/example - run: | - sleep 15 - # Uncomment following line to have simulator logs printed out for debugging purposes. - # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & - flutter test integration_test/cloud_firestore_e2e_test.dart -d "macos" --dart-define=CI=true - FLUTTER_DRIVE_EXIT_CODE=$? - exit $FLUTTER_DRIVE_EXIT_CODE +# - name: Upload Emulator Log +# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce +# if: always() +# with: +# name: ${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-${{matrix.first-boot-delay}}-${{matrix.iteration}}-adb_logs +# path: tests/adb-log.txt.gz - web: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - with: - fetch-depth: 0 - - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c - name: Install Node.js 16 - with: - node-version: "16" - - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 - with: - distribution: 'temurin' - java-version: '11' - - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - with: - channel: 'stable' - cache: true - - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a - with: - run-bootstrap: false - melos-version: '3.0.1' - - name: "Install Tools" - run: | - sudo npm i -g firebase-tools@11.28.0 - - name: Start Firebase Emulator - run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - - name: "E2E Tests" - working-directory: packages/cloud_firestore/cloud_firestore/example - # Web devices are not supported for the `flutter test` command yet. As a - # workaround we can use the `flutter drive` command. Tracking issue: - # https://github.com/flutter/flutter/issues/66264 - run: | - chromedriver --port=4444 & - flutter drive \ - --verbose-system-logs \ - -d web-server \ - --driver=test_driver/integration_test.dart \ - --target=integration_test/cloud_firestore_e2e_test.dart \ - --dart-define=CI=true + +# apple: +# runs-on: macos-13-xl +# timeout-minutes: 45 +# steps: +# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 +# with: +# fetch-depth: 0 +# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 +# with: +# distribution: 'temurin' +# java-version: '11' +# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d +# with: +# channel: 'stable' +# cache: true +# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a +# with: +# run-bootstrap: false +# melos-version: '3.0.1' +# - name: "Install Tools" +# run: | +# sudo npm i -g firebase-tools@11.28.0 +# - name: Start Firebase Emulator +# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh +# - name: "iOS E2E Tests" +# working-directory: packages/cloud_firestore/cloud_firestore/example +# run: | +# # Boot simulator and wait for System app to be ready. +# # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators +# SIMULATOR="iPhone 14" +# xcrun simctl bootstatus "$SIMULATOR" -b +# xcrun simctl logverbose "$SIMULATOR" enable +# # Sleep to allow simulator to settle. +# sleep 15 +# # Uncomment following line to have simulator logs printed out for debugging purposes. +# # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & +# flutter test integration_test/cloud_firestore_e2e_test.dart -d "$SIMULATOR" --dart-define=CI=true +# FLUTTER_DRIVE_EXIT_CODE=$? +# xcrun simctl shutdown "$SIMULATOR" +# exit $FLUTTER_DRIVE_EXIT_CODE +# - name: "Reset Firestore Emulator" +# run: cd ./.github/workflows/scripts && ./reset-firestore-emulator.sh +# - name: "macOS E2E Tests" +# working-directory: packages/cloud_firestore/cloud_firestore/example +# run: | +# sleep 15 +# # Uncomment following line to have simulator logs printed out for debugging purposes. +# # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & +# flutter test integration_test/cloud_firestore_e2e_test.dart -d "macos" --dart-define=CI=true +# FLUTTER_DRIVE_EXIT_CODE=$? +# exit $FLUTTER_DRIVE_EXIT_CODE + +# web: +# runs-on: ubuntu-latest +# timeout-minutes: 15 +# steps: +# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 +# with: +# fetch-depth: 0 +# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c +# name: Install Node.js 16 +# with: +# node-version: "16" +# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 +# with: +# distribution: 'temurin' +# java-version: '11' +# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d +# with: +# channel: 'stable' +# cache: true +# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a +# with: +# run-bootstrap: false +# melos-version: '3.0.1' +# - name: "Install Tools" +# run: | +# sudo npm i -g firebase-tools@11.28.0 +# - name: Start Firebase Emulator +# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh +# - name: "E2E Tests" +# working-directory: packages/cloud_firestore/cloud_firestore/example +# # Web devices are not supported for the `flutter test` command yet. As a +# # workaround we can use the `flutter drive` command. Tracking issue: +# # https://github.com/flutter/flutter/issues/66264 +# run: | +# chromedriver --port=4444 & +# flutter drive \ +# --verbose-system-logs \ +# -d web-server \ +# --driver=test_driver/integration_test.dart \ +# --target=integration_test/cloud_firestore_e2e_test.dart \ +# --dart-define=CI=true diff --git a/packages/cloud_firestore/cloud_firestore/example/integration_test/cloud_firestore_e2e_test.dart b/packages/cloud_firestore/cloud_firestore/example/integration_test/e2e_test.dart similarity index 100% rename from packages/cloud_firestore/cloud_firestore/example/integration_test/cloud_firestore_e2e_test.dart rename to packages/cloud_firestore/cloud_firestore/example/integration_test/e2e_test.dart From e79a22fdef7da6013438fb5b3b26352f2bee511f Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 15:01:33 +0200 Subject: [PATCH 22/32] ci: tests --- .github/workflows/e2e_tests.yaml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 0de37271ef7f..d2d1f123ddca 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -25,12 +25,12 @@ on: - "**.md" jobs: - strategy: - matrix: - working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] android: runs-on: macos-13-xl timeout-minutes: 45 + strategy: + matrix: + working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -113,6 +113,9 @@ jobs: ios: runs-on: macos-13-xl timeout-minutes: 45 + strategy: + matrix: + working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -187,6 +190,9 @@ jobs: macos: runs-on: macos-13-xl timeout-minutes: 45 + strategy: + matrix: + working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c @@ -252,6 +258,9 @@ jobs: web: runs-on: ubuntu-latest timeout-minutes: 15 + strategy: + matrix: + working_directory: ['tests', 'packages/cloud_firestore/cloud_firestore/example'] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c From 4f8f33e4fc4688e2f69d260414269b462d3ea94c Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Wed, 26 Apr 2023 15:22:11 +0200 Subject: [PATCH 23/32] ci: final --- .github/workflows/firebase_firestore.yaml | 197 ---------------------- 1 file changed, 197 deletions(-) delete mode 100644 .github/workflows/firebase_firestore.yaml diff --git a/.github/workflows/firebase_firestore.yaml b/.github/workflows/firebase_firestore.yaml deleted file mode 100644 index ed5f7649acfb..000000000000 --- a/.github/workflows/firebase_firestore.yaml +++ /dev/null @@ -1,197 +0,0 @@ -# name: firebase_firestore - -# concurrency: -# group: ${{ github.workflow }}-${{ github.ref }} -# cancel-in-progress: true - -# on: -# pull_request: -# paths: -# - "packages/firebase_core/**" -# - "packages/cloud_firestore/**" -# - ".github/workflows/firebase_firestore.yaml" -# push: -# branches: -# - master -# paths-ignore: -# - "docs/**" -# - "**.md" - -# env: -# FLUTTERFIRE_PLUGIN_SCOPE: "*cloud_firestore*" -# FLUTTERFIRE_PLUGIN_SCOPE_EXAMPLE: "*cloud_firestore_example*" - -# jobs: -# android: -# runs-on: macos-13-xl -# timeout-minutes: 45 -# steps: -# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 -# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c -# name: Install Node.js 16 -# with: -# node-version: "16" -# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 -# with: -# distribution: "temurin" -# java-version: "11" -# - uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 -# name: Gradle Cache -# with: -# path: ~/.gradle/caches -# key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }} -# restore-keys: ${{ runner.os }}-gradle-v2 -# - uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 -# id: avd-cache -# with: -# path: | -# ~/.android/avd/* -# ~/.android/adb* -# key: avd -# - name: Generate AVD snapshot for caching -# if: steps.avd-cache.outputs.cache-hit != 'true' -# uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 -# with: -# api-level: 30 -# arch: x86_64 -# target: google_apis -# profile: Nexus 5X -# script: echo "Generated AVD snapshot for caching" -# - name: Firebase Emulator Cache -# uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 -# with: -# path: ~/.cache/firebase/emulators -# key: firebase-emulators-v2-${{ github.run_id }} -# restore-keys: firebase-emulators-v2 -# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d -# with: -# channel: 'stable' -# cache: true -# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a -# with: -# run-bootstrap: false -# melos-version: '3.0.1' -# - name: "Install Tools" -# run: | -# sudo npm i -g firebase-tools@11.28.0 -# - name: Start Firebase Emulator -# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh -# - name: "E2E Tests" -# uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 -# timeout-minutes: 30 -# with: -# api-level: 30 -# arch: x86_64 -# target: google_apis -# profile: Nexus 5X -# working-directory: packages/cloud_firestore/cloud_firestore/example -# script: | -# sleep 15 -# $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & -# flutter test integration_test/cloud_firestore_e2e_test.dart --dart-define=CI=true -# - name: Compress Emulator Log -# if: always() -# run: cd tests/ && gzip -9 adb-log.txt -# shell: bash - -# - name: Upload Emulator Log -# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce -# if: always() -# with: -# name: ${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-${{matrix.first-boot-delay}}-${{matrix.iteration}}-adb_logs -# path: tests/adb-log.txt.gz - - -# apple: -# runs-on: macos-13-xl -# timeout-minutes: 45 -# steps: -# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 -# with: -# fetch-depth: 0 -# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 -# with: -# distribution: 'temurin' -# java-version: '11' -# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d -# with: -# channel: 'stable' -# cache: true -# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a -# with: -# run-bootstrap: false -# melos-version: '3.0.1' -# - name: "Install Tools" -# run: | -# sudo npm i -g firebase-tools@11.28.0 -# - name: Start Firebase Emulator -# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh -# - name: "iOS E2E Tests" -# working-directory: packages/cloud_firestore/cloud_firestore/example -# run: | -# # Boot simulator and wait for System app to be ready. -# # List of available simulators: https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md#installed-simulators -# SIMULATOR="iPhone 14" -# xcrun simctl bootstatus "$SIMULATOR" -b -# xcrun simctl logverbose "$SIMULATOR" enable -# # Sleep to allow simulator to settle. -# sleep 15 -# # Uncomment following line to have simulator logs printed out for debugging purposes. -# # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & -# flutter test integration_test/cloud_firestore_e2e_test.dart -d "$SIMULATOR" --dart-define=CI=true -# FLUTTER_DRIVE_EXIT_CODE=$? -# xcrun simctl shutdown "$SIMULATOR" -# exit $FLUTTER_DRIVE_EXIT_CODE -# - name: "Reset Firestore Emulator" -# run: cd ./.github/workflows/scripts && ./reset-firestore-emulator.sh -# - name: "macOS E2E Tests" -# working-directory: packages/cloud_firestore/cloud_firestore/example -# run: | -# sleep 15 -# # Uncomment following line to have simulator logs printed out for debugging purposes. -# # xcrun simctl spawn booted log stream --predicate 'eventMessage contains "flutter"' & -# flutter test integration_test/cloud_firestore_e2e_test.dart -d "macos" --dart-define=CI=true -# FLUTTER_DRIVE_EXIT_CODE=$? -# exit $FLUTTER_DRIVE_EXIT_CODE - -# web: -# runs-on: ubuntu-latest -# timeout-minutes: 15 -# steps: -# - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 -# with: -# fetch-depth: 0 -# - uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c -# name: Install Node.js 16 -# with: -# node-version: "16" -# - uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98 -# with: -# distribution: 'temurin' -# java-version: '11' -# - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d -# with: -# channel: 'stable' -# cache: true -# - uses: bluefireteam/melos-action@dd3c344d731938d2ab2567a261f54a19a68b5f6a -# with: -# run-bootstrap: false -# melos-version: '3.0.1' -# - name: "Install Tools" -# run: | -# sudo npm i -g firebase-tools@11.28.0 -# - name: Start Firebase Emulator -# run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh -# - name: "E2E Tests" -# working-directory: packages/cloud_firestore/cloud_firestore/example -# # Web devices are not supported for the `flutter test` command yet. As a -# # workaround we can use the `flutter drive` command. Tracking issue: -# # https://github.com/flutter/flutter/issues/66264 -# run: | -# chromedriver --port=4444 & -# flutter drive \ -# --verbose-system-logs \ -# -d web-server \ -# --driver=test_driver/integration_test.dart \ -# --target=integration_test/cloud_firestore_e2e_test.dart \ -# --dart-define=CI=true From dd208cbbed12a20f66bece92914401b72200898c Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 09:23:16 +0200 Subject: [PATCH 24/32] ci: manual android emulator --- .github/workflows/e2e_tests.yaml | 47 +++++++++++++++----------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index d2d1f123ddca..72eaa4e36d6b 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -26,7 +26,7 @@ on: jobs: android: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: @@ -54,15 +54,6 @@ jobs: ~/.android/avd/* ~/.android/adb* key: avd - - name: Generate AVD snapshot for caching - if: steps.avd-cache.outputs.cache-hit != 'true' - uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 - with: - api-level: 30 - arch: x86_64 - target: google_apis - profile: Nexus 5X - script: echo "Generated AVD snapshot for caching" - name: Firebase Emulator Cache uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 with: @@ -84,20 +75,26 @@ jobs: sudo npm i -g firebase-tools@11.28.0 - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh + - name: Create and start emulator + # We use the installed SDK in the macOS image to create and start the emulator + run: | + echo "List installed packages" + $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --list_installed + + echo "Installing system image" + echo "y" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;google_apis;x86_64" + + echo "Creating AVD" + echo "no" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager create avd -n test_emulator -k "system-images;android-33;google_apis;x86_64" --force + echo "Starting emulator" + $ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window & + adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' - name: "E2E Tests" - uses: reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 - timeout-minutes: 30 - with: - api-level: 30 - arch: x86_64 - target: google_apis - profile: Nexus 5X - working-directory: ${{ matrix.working_directory }} - script: | - sleep 15 - $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & - flutter test integration_test/e2e_test.dart --dart-define=CI=true - - name: Compress Emulator Log + working-directory: tests + run: | + sleep 15 + $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & + flutter test integration_test/e2e_test.dart --dart-define=CI=true - name: Compress Emulator Log if: always() run: cd tests/ && gzip -9 adb-log.txt shell: bash @@ -111,7 +108,7 @@ jobs: ios: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: @@ -188,7 +185,7 @@ jobs: exit $FLUTTER_DRIVE_EXIT_CODE macos: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: From d0882ab3859754fb30c4e79bca3a3b3f1d480959 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 09:28:33 +0200 Subject: [PATCH 25/32] ci: manual android emulator --- .github/workflows/e2e_tests.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 72eaa4e36d6b..38a5dd23f197 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -26,7 +26,7 @@ on: jobs: android: - runs-on: macos-13 + runs-on: macos-13-xl timeout-minutes: 45 strategy: matrix: @@ -94,7 +94,8 @@ jobs: run: | sleep 15 $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & - flutter test integration_test/e2e_test.dart --dart-define=CI=true - name: Compress Emulator Log + flutter test integration_test/e2e_test.dart --dart-define=CI=true + - name: Compress Emulator Log if: always() run: cd tests/ && gzip -9 adb-log.txt shell: bash @@ -108,7 +109,7 @@ jobs: ios: - runs-on: macos-13 + runs-on: macos-13-xl timeout-minutes: 45 strategy: matrix: @@ -185,7 +186,7 @@ jobs: exit $FLUTTER_DRIVE_EXIT_CODE macos: - runs-on: macos-13 + runs-on: macos-13-xl timeout-minutes: 45 strategy: matrix: From b8d79c03cbb69fe64eac67e26896682ed0a705b7 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 09:48:31 +0200 Subject: [PATCH 26/32] ci: manual android emulator --- .github/workflows/e2e_tests.yaml | 10 +++++----- .github/workflows/firebase_firestore_odm.yaml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 38a5dd23f197..8ad77b14e466 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -72,7 +72,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.28.0 + sudo npm i -g firebase-tools - name: Start Firebase Emulator run: cd ./.github/workflows/scripts && ./start-firebase-emulator.sh - name: Create and start emulator @@ -90,7 +90,7 @@ jobs: $ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window & adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' - name: "E2E Tests" - working-directory: tests + working-directory: ${{ matrix.working_directory }} run: | sleep 15 $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & @@ -154,7 +154,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.28.0 + sudo npm i -g firebase-tools - name: "Build Application" working-directory: ${{ matrix.working_directory }} run: | @@ -231,7 +231,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.28.0 + sudo npm i -g firebase-tools - name: "Build Application" working-directory: ${{ matrix.working_directory }} run: | @@ -281,7 +281,7 @@ jobs: run: melos bootstrap --scope tests - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.28.0 + sudo npm i -g firebase-tools - name: Cache Firebase Emulator uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 with: diff --git a/.github/workflows/firebase_firestore_odm.yaml b/.github/workflows/firebase_firestore_odm.yaml index 1cf861730bec..24444046b32c 100644 --- a/.github/workflows/firebase_firestore_odm.yaml +++ b/.github/workflows/firebase_firestore_odm.yaml @@ -72,7 +72,7 @@ jobs: melos-version: '3.0.1' - name: "Install Tools" run: | - sudo npm i -g firebase-tools@11.28.0 + sudo npm i -g firebase-tools - name: "Bootstrap Workspace" run: | melos bootstrap --scope="*firebase_core*" --scope="$FLUTTERFIRE_PLUGIN_SCOPE" From 14eb60e1fdd946fd65c967ef82c73f867f48ad63 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 10:24:17 +0200 Subject: [PATCH 27/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 5 +++++ .../cloud_firestore/example/android/app/build.gradle | 4 ++-- .../example/android/app/src/debug/AndroidManifest.xml | 2 +- .../example/android/app/src/main/AndroidManifest.xml | 2 +- .../plugins/firebase/firestore}/example/MainActivity.kt | 2 +- .../example/android/app/src/profile/AndroidManifest.xml | 2 +- .../cloud_firestore/example/android/build.gradle | 2 +- 7 files changed, 12 insertions(+), 7 deletions(-) rename packages/cloud_firestore/cloud_firestore/example/android/app/src/main/kotlin/{com/example => io/flutter/plugins/firebase/firestore}/example/MainActivity.kt (64%) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 8ad77b14e466..b83658200c2a 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -48,6 +48,7 @@ jobs: key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }} restore-keys: ${{ runner.os }}-gradle-v2 - uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 + name: AVD Cache id: avd-cache with: path: | @@ -86,9 +87,13 @@ jobs: echo "Creating AVD" echo "no" | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/avdmanager create avd -n test_emulator -k "system-images;android-33;google_apis;x86_64" --force + echo "Starting emulator" $ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window & adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' + + echo "Granting permissions" + adb shell pm grant com.example.yourapp android.permission.POST_NOTIFICATIONS - name: "E2E Tests" working-directory: ${{ matrix.working_directory }} run: | diff --git a/packages/cloud_firestore/cloud_firestore/example/android/app/build.gradle b/packages/cloud_firestore/cloud_firestore/example/android/app/build.gradle index b70a723aa46d..198808460baf 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/app/build.gradle +++ b/packages/cloud_firestore/cloud_firestore/example/android/app/build.gradle @@ -29,7 +29,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion flutter.compileSdkVersion + compileSdkVersion 33 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -48,7 +48,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.flutter.plugins.firebase.firestore.example" minSdkVersion 19 - targetSdkVersion flutter.targetSdkVersion + targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true diff --git a/packages/cloud_firestore/cloud_firestore/example/android/app/src/debug/AndroidManifest.xml b/packages/cloud_firestore/cloud_firestore/example/android/app/src/debug/AndroidManifest.xml index c208884f3014..9eb145498d6f 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/app/src/debug/AndroidManifest.xml +++ b/packages/cloud_firestore/cloud_firestore/example/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="io.flutter.plugins.firebase.firestore.example"> diff --git a/packages/cloud_firestore/cloud_firestore/example/android/app/src/main/AndroidManifest.xml b/packages/cloud_firestore/cloud_firestore/example/android/app/src/main/AndroidManifest.xml index 3f41384dbc28..3a11e7924f75 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/app/src/main/AndroidManifest.xml +++ b/packages/cloud_firestore/cloud_firestore/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="io.flutter.plugins.firebase.firestore.example"> + package="io.flutter.plugins.firebase.firestore.example"> diff --git a/packages/cloud_firestore/cloud_firestore/example/android/build.gradle b/packages/cloud_firestore/cloud_firestore/example/android/build.gradle index a6ecb5002903..0d1b7eed9d19 100644 --- a/packages/cloud_firestore/cloud_firestore/example/android/build.gradle +++ b/packages/cloud_firestore/cloud_firestore/example/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.21' + ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() From 34a92fce10c987de5e739cc33040adb8f324e5ad Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 10:25:58 +0200 Subject: [PATCH 28/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index b83658200c2a..2a19e7d2a08a 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -93,7 +93,7 @@ jobs: adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' echo "Granting permissions" - adb shell pm grant com.example.yourapp android.permission.POST_NOTIFICATIONS + adb shell pm grant io.flutter.plugins.firebase.tests android.permission.POST_NOTIFICATIONS - name: "E2E Tests" working-directory: ${{ matrix.working_directory }} run: | From cf61a9640eae61599651e8a87a2a2c28160afa96 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 11:20:05 +0200 Subject: [PATCH 29/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 3 --- .../firebase_messaging/firebase_messaging_e2e_test.dart | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 2a19e7d2a08a..e25e778f784b 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -91,9 +91,6 @@ jobs: echo "Starting emulator" $ANDROID_SDK_ROOT/emulator/emulator -avd test_emulator -no-audio -no-boot-anim -no-window & adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' - - echo "Granting permissions" - adb shell pm grant io.flutter.plugins.firebase.tests android.permission.POST_NOTIFICATIONS - name: "E2E Tests" working-directory: ${{ matrix.working_directory }} run: | diff --git a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart index 3b40eecf1b39..276bfdcb0182 100644 --- a/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart +++ b/tests/integration_test/firebase_messaging/firebase_messaging_e2e_test.dart @@ -93,7 +93,8 @@ void main() { expect(result, isA()); expect(result.authorizationStatus, AuthorizationStatus.authorized); }, - skip: defaultTargetPlatform != TargetPlatform.android || kIsWeb, + // TODO(Lyokone): since moving to SDK 33+ on Android, this test fails, we need to integrate with patrol to control native permissions + skip: true, ); }); From 75058490ef804c7336604105d7a285b4929a0e7e Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 12:00:34 +0200 Subject: [PATCH 30/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index e25e778f784b..ebf2fa7a47bb 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -95,7 +95,7 @@ jobs: working-directory: ${{ matrix.working_directory }} run: | sleep 15 - $ANDROID_HOME/platform-tools/adb logcat '*:D' > adb-log.txt & + $ANDROID_SDK_ROOT/platform-tools/adb logcat '*:D' > adb-log.txt & flutter test integration_test/e2e_test.dart --dart-define=CI=true - name: Compress Emulator Log if: always() From 5945b27dc4c6e69d87cc63c4797692e48dbe9c97 Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 12:06:20 +0200 Subject: [PATCH 31/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index ebf2fa7a47bb..2806035a2b0b 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -26,7 +26,7 @@ on: jobs: android: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: @@ -111,7 +111,7 @@ jobs: ios: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: @@ -188,7 +188,7 @@ jobs: exit $FLUTTER_DRIVE_EXIT_CODE macos: - runs-on: macos-13-xl + runs-on: macos-13 timeout-minutes: 45 strategy: matrix: From 9606a25ec467a6d7620be6b1c5f507dc366849ab Mon Sep 17 00:00:00 2001 From: Guillaume Bernos Date: Thu, 27 Apr 2023 13:30:45 +0200 Subject: [PATCH 32/32] ci: fix android notification request and cloud firestore package name --- .github/workflows/e2e_tests.yaml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml index 2806035a2b0b..fa284b4c49bc 100644 --- a/.github/workflows/e2e_tests.yaml +++ b/.github/workflows/e2e_tests.yaml @@ -94,21 +94,7 @@ jobs: - name: "E2E Tests" working-directory: ${{ matrix.working_directory }} run: | - sleep 15 - $ANDROID_SDK_ROOT/platform-tools/adb logcat '*:D' > adb-log.txt & flutter test integration_test/e2e_test.dart --dart-define=CI=true - - name: Compress Emulator Log - if: always() - run: cd tests/ && gzip -9 adb-log.txt - shell: bash - - - name: Upload Emulator Log - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce - if: always() - with: - name: ${{ matrix.api-level }}-${{ matrix.arch }}-${{matrix.target}}-${{matrix.first-boot-delay}}-${{matrix.iteration}}-adb_logs - path: tests/adb-log.txt.gz - ios: runs-on: macos-13