Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ jobs:
# one small job instead of the whole run. `integration_test/e2e_test.dart`
# still aggregates every suite for Windows and local runs.
suite:
- name: auth
working_directory: tests
target: integration_test/shards/auth_shard_test.dart
scope: tests
- name: database_functions
working_directory: tests
target: integration_test/shards/database_functions_shard_test.dart
scope: tests
- name: core_misc
working_directory: tests
target: integration_test/shards/core_misc_shard_test.dart
Expand Down
595 changes: 595 additions & 0 deletions .github/workflows/e2e_tests_auth.yaml

Large diffs are not rendered by default.

551 changes: 551 additions & 0 deletions .github/workflows/e2e_tests_database.yaml

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions .github/workflows/e2e_tests_functions.yaml

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions .github/workflows/ios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ jobs:
# one small job instead of the whole run. `integration_test/e2e_test.dart`
# still aggregates every suite for Windows and local runs.
suite:
- name: auth
working_directory: tests
target: integration_test/shards/auth_shard_test.dart
scope: tests
- name: database_functions
working_directory: tests
target: integration_test/shards/database_functions_shard_test.dart
scope: tests
- name: core_misc
working_directory: tests
target: integration_test/shards/core_misc_shard_test.dart
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ jobs:
# one small job instead of the whole run. `integration_test/e2e_test.dart`
# still aggregates every suite for Windows and local runs.
suite:
- name: auth
working_directory: tests
target: integration_test/shards/auth_shard_test.dart
scope: tests
- name: database_functions
working_directory: tests
target: integration_test/shards/database_functions_shard_test.dart
scope: tests
- name: core_misc
working_directory: tests
target: integration_test/shards/core_misc_shard_test.dart
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ jobs:
uses: ./.github/workflows/e2e_tests_storage.yaml
with:
nightly_test_mode: ${{ github.event.inputs.test_mode == 'true' }}
e2e-auth:
uses: ./.github/workflows/e2e_tests_auth.yaml
with:
nightly_test_mode: ${{ github.event.inputs.test_mode == 'true' }}
e2e-database:
uses: ./.github/workflows/e2e_tests_database.yaml
with:
nightly_test_mode: ${{ github.event.inputs.test_mode == 'true' }}
e2e-functions:
uses: ./.github/workflows/e2e_tests_functions.yaml
with:
nightly_test_mode: ${{ github.event.inputs.test_mode == 'true' }}
e2e-pipeline:
uses: ./.github/workflows/e2e_tests_pipeline.yaml
if: ${{ github.event.inputs.test_mode != 'true' }}
Expand All @@ -66,7 +78,7 @@ jobs:
contents: read
issues: write
if: ${{ always() && !cancelled() }}
needs: [e2e-android, e2e-ios, e2e-macos, e2e-web, e2e-windows, e2e-fdc, e2e-storage, e2e-pipeline]
needs: [e2e-android, e2e-ios, e2e-macos, e2e-web, e2e-windows, e2e-fdc, e2e-storage, e2e-auth, e2e-database, e2e-functions, e2e-pipeline]
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
Expand All @@ -83,6 +95,9 @@ jobs:
WINDOWS_STATUS: ${{ needs.e2e-windows.result }}
FDC_STATUS: ${{ needs.e2e-fdc.result }}
STORAGE_STATUS: ${{ needs.e2e-storage.result }}
AUTH_STATUS: ${{ needs.e2e-auth.result }}
DATABASE_STATUS: ${{ needs.e2e-database.result }}
FUNCTIONS_STATUS: ${{ needs.e2e-functions.result }}
PIPELINE_STATUS: ${{ needs.e2e-pipeline.result }}
REPO: ${{ github.repository }}
run: |
Expand Down
54 changes: 50 additions & 4 deletions .github/workflows/scripts/generate-dummy-firebase-configs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,51 @@ void main(List<String> arguments) {
appleBundleId: 'io.flutter.plugins.firebase.storage.example',
);
}

if (arguments.contains('--auth-native')) {
// The auth example's Android app applies the `google-services` plugin and
// both its Xcode projects list GoogleService-Info.plist in a Resources
// build phase, so the native builds fail outright without these files.
_writeNativeConfigs(
exampleRoot: 'packages/firebase_auth/firebase_auth/example',
androidPackageName: 'io.flutter.plugins.firebase.auth.example',
appleBundleId: 'io.flutter.plugins.firebase.auth.example',
);
}

if (arguments.contains('--database-native')) {
// The database example's Android app applies the `google-services` plugin,
// and its macOS Xcode project lists GoogleService-Info.plist in a Resources
// build phase. Its iOS project does not reference the plist, but the file
// is written anyway so both Apple targets stay consistent - hence the
// separate macOS bundle id, which differs from the iOS one here.
_writeNativeConfigs(
exampleRoot: 'packages/firebase_database/firebase_database/example',
androidPackageName: 'io.flutter.plugins.firebase.database.example',
appleBundleId: 'io.flutter.plugins.firebase.database.example',
macosBundleId: 'io.flutter.plugins.firebaseDatabaseExample',
);
}

if (arguments.contains('--functions-native')) {
// The functions example's Android app applies the `google-services` plugin
// and both its Xcode projects list GoogleService-Info.plist in a Resources
// build phase.
_writeNativeConfigs(
exampleRoot: 'packages/cloud_functions/cloud_functions/example',
androidPackageName: 'io.flutter.plugins.firebase.functions.example',
appleBundleId: 'io.flutter.plugins.firebase.functions.example',
);
}
}

void _writeNativeConfigs({
required String exampleRoot,
required String androidPackageName,
required String appleBundleId,
// Defaults to [appleBundleId]; only the examples whose macOS target carries a
// different bundle id need to pass this.
String? macosBundleId,
}) {
final androidPath = '$exampleRoot/android/app/google-services.json';

Expand Down Expand Up @@ -152,7 +191,8 @@ void _writeNativeConfigs({
'${const JsonEncoder.withIndent(' ').convert(androidConfig)}\n',
);

final appleConfig = '''<?xml version="1.0" encoding="UTF-8"?>
String applePlist(String bundleId) =>
'''<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
Expand All @@ -163,7 +203,7 @@ void _writeNativeConfigs({
\t<key>PLIST_VERSION</key>
\t<string>1</string>
\t<key>BUNDLE_ID</key>
\t<string>$appleBundleId</string>
\t<string>$bundleId</string>
\t<key>PROJECT_ID</key>
\t<string>flutterfire-e2e-tests</string>
\t<key>STORAGE_BUCKET</key>
Expand All @@ -173,8 +213,14 @@ void _writeNativeConfigs({
</dict>
</plist>
''';
_write('$exampleRoot/ios/Runner/GoogleService-Info.plist', appleConfig);
_write('$exampleRoot/macos/Runner/GoogleService-Info.plist', appleConfig);
_write(
'$exampleRoot/ios/Runner/GoogleService-Info.plist',
applePlist(appleBundleId),
);
_write(
'$exampleRoot/macos/Runner/GoogleService-Info.plist',
applePlist(macosBundleId ?? appleBundleId),
);
}

void _write(String path, String contents) {
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/scripts/nightly_issue_dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ void main() async {
final windowsStatus = env['WINDOWS_STATUS'] ?? 'skipped';
final fdcStatus = env['FDC_STATUS'] ?? 'skipped';
final storageStatus = env['STORAGE_STATUS'] ?? 'skipped';
final authStatus = env['AUTH_STATUS'] ?? 'skipped';
final databaseStatus = env['DATABASE_STATUS'] ?? 'skipped';
final functionsStatus = env['FUNCTIONS_STATUS'] ?? 'skipped';
final pipelineStatus = env['PIPELINE_STATUS'] ?? 'skipped';
final runId = env['GITHUB_RUN_ID'];
final serverUrl = env['GITHUB_SERVER_URL'] ?? 'https://github.com';
Expand All @@ -48,10 +51,13 @@ void main() async {
final windowsIcon = _getIcon(windowsStatus);
final fdcIcon = _getIcon(fdcStatus);
final storageIcon = _getIcon(storageStatus);
final authIcon = _getIcon(authStatus);
final databaseIcon = _getIcon(databaseStatus);
final functionsIcon = _getIcon(functionsStatus);
final pipelineIcon = _getIcon(pipelineStatus);

final newRow =
'| $date | $androidIcon | $iosIcon | $webIcon | $macosIcon | $windowsIcon | $fdcIcon | $storageIcon | $pipelineIcon | $notes |';
'| $date | $androidIcon | $iosIcon | $webIcon | $macosIcon | $windowsIcon | $fdcIcon | $storageIcon | $authIcon | $databaseIcon | $functionsIcon | $pipelineIcon | $notes |';

print('New Row: $newRow');

Expand Down Expand Up @@ -134,8 +140,8 @@ Future<void> _createIssue(
'''
## Testing History (last 30 days)

| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Pipeline | Notes |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Auth | Database | Functions | Pipeline | Notes |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
$newRow
''',
};
Expand Down Expand Up @@ -230,10 +236,10 @@ String _appendRow(String currentBody, String newRow) {
if (line.startsWith('| Date |')) {
if (!processedTable) {
newBodyLines.add(
'| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Pipeline | Notes |',
'| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Auth | Database | Functions | Pipeline | Notes |',
);
newBodyLines.add(
'| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |',
'| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |',
);
newBodyLines.addAll(tableRows);
processedTable = true;
Expand All @@ -252,10 +258,10 @@ String _appendRow(String currentBody, String newRow) {
newBodyLines.add('## Testing History (last 30 days)');
newBodyLines.add('');
newBodyLines.add(
'| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Pipeline | Notes |',
'| Date | Android | iOS | Web | MacOS | Windows | FDC | Storage | Auth | Database | Functions | Pipeline | Notes |',
);
newBodyLines.add(
'| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |',
'| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |',
);
newBodyLines.add(newRow);
}
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ jobs:
# not in any shard on web: `web-app-check` below keeps running it alone,
# because it is throttled when it shares a run with the other suites.
suite:
- name: auth
working_directory: tests
target: integration_test/shards/auth_shard_test.dart
scope: tests
- name: database_functions
working_directory: tests
target: integration_test/shards/database_functions_shard_test.dart
scope: tests
- name: core_misc
working_directory: tests
target: integration_test/shards/core_misc_shard_test.dart
Expand Down Expand Up @@ -226,14 +218,6 @@ jobs:
matrix:
# Same sharding as the `web` job above; see the comment there.
suite:
- name: auth
working_directory: tests
target: integration_test/shards/auth_shard_test.dart
scope: tests
- name: database_functions
working_directory: tests
target: integration_test/shards/database_functions_shard_test.dart
scope: tests
- name: core_misc
working_directory: tests
target: integration_test/shards/core_misc_shard_test.dart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tests/firebase_options.dart';
import 'package:cloud_functions_example/firebase_options.dart';

import 'sample_data.dart' as data;

Expand Down
6 changes: 6 additions & 0 deletions packages/cloud_functions/cloud_functions/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,11 @@ dependencies:
flutter:
sdk: flutter

dev_dependencies:
flutter_test:
sdk: flutter
integration_test:
sdk: flutter

flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2022, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tests/firebase_options.dart';
import 'package:firebase_auth_example/firebase_options.dart';

import 'firebase_auth_instance_e2e_test.dart' as instance_tests;
import 'firebase_auth_multi_factor_e2e_test.dart' as multi_factor_tests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tests/firebase_options.dart';
import 'package:firebase_auth_example/firebase_options.dart';

import './test_utils.dart';

Expand Down
13 changes: 12 additions & 1 deletion packages/firebase_auth/firebase_auth/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,23 @@ dependencies:
firebase_messaging: ^16.5.0
flutter:
sdk: flutter
flutter_facebook_auth: ^7.1.5
# 7.2.0 is the first release shipping Package.swift; the iOS e2e job builds
# this example with Swift Package Manager.
flutter_facebook_auth: ^7.2.0
google_sign_in: ^6.1.0
google_sign_in_dartio: ^0.3.0

dev_dependencies:
# `test_utils.dart` reaches for IterableExtension when scanning the emulator's
# oobCode list.
collection: ^1.15.0
flutter_test:
sdk: flutter
# The e2e suite drives the Auth emulator's REST API directly (clearing users,
# reading oobCodes and SMS verification codes).
http: ^1.0.0
integration_test:
sdk: flutter

flutter:
uses-material-design: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2022, the Chromium project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:integration_test/integration_test_driver.dart';

Future<void> main() => integrationDriver();
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import 'package:flutter_test/flutter_test.dart';

import 'firebase_database_e2e_test.dart';
import 'e2e_test.dart';

void setupDatabaseTests() {
group('FirebaseDatabase.ref()', () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter_test/flutter_test.dart';

import 'firebase_database_e2e_test.dart';
import 'e2e_test.dart';

DatabaseReference _uniqueRef(String name) {
return database.ref(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
import 'package:tests/firebase_options.dart';
import 'package:firebase_database_example/firebase_options.dart';

import 'data_snapshot_e2e.dart';
import 'database_e2e.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

import 'firebase_database_e2e_test.dart';
import 'e2e_test.dart';

const MAX_CACHE_SIZE = 100 * 1024 * 1024;
const MIN_CACHE_SIZE = 1042 * 1024;
Expand Down
14 changes: 14 additions & 0 deletions packages/firebase_database/firebase_database/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,19 @@ dependencies:
flutter:
sdk: flutter

dev_dependencies:
# `query_e2e.dart` uses ListEquality when comparing ordered query results.
collection: ^1.15.0
# The e2e suite reaches for MethodChannelFirebase, which firebase_core
# deliberately hides from its own re-export.
firebase_core_platform_interface: ^8.1.0
# `web_only.dart` (conditionally imported) asserts on the web plugin's
# JS-interop surface directly.
firebase_database_web: ^0.2.7+13
flutter_test:
sdk: flutter
integration_test:
sdk: flutter

flutter:
uses-material-design: true
Loading
Loading