Skip to content

Commit 97a799f

Browse files
committed
Test how long ios builds without firebase
# Conflicts: # .github/workflows/e2e_test.yml # sample_app/ios/Runner.xcworkspace/xcshareddata/swiftpm/Package.resolved
1 parent 717afab commit 97a799f

11 files changed

Lines changed: 161 additions & 37 deletions

File tree

.github/workflows/e2e_test.yml

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,54 +21,56 @@ env:
2121
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
2222

2323
jobs:
24-
# android:
25-
# runs-on: ubuntu-latest
26-
# steps:
27-
# - uses: actions/checkout@v6
24+
android:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v6
28+
29+
- uses: ./.github/actions/setup-java
2830

29-
# - uses: ./.github/actions/setup-java
31+
- uses: ./.github/actions/cache-gradle
3032

31-
# - uses: ./.github/actions/cache-gradle
33+
- uses: ./.github/actions/setup-ruby
3234

33-
# - uses: ./.github/actions/setup-ruby
35+
- uses: ./.github/actions/setup-flutter
3436

35-
# - uses: ./.github/actions/setup-flutter
37+
- run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
3638

37-
# - name: Bootstrap
38-
# run: |
39-
# flutter pub global activate melos
40-
# melos bootstrap
39+
- name: Bootstrap
40+
run: |
41+
flutter pub global activate melos
42+
melos bootstrap
4143
42-
# - uses: ./.github/actions/enable-kvm
44+
- uses: ./.github/actions/enable-kvm
4345

44-
# - name: Launch Allure TestOps
45-
# run: cd sample_app/android && bundle exec fastlane allure_launch
46-
# env:
47-
# GITHUB_EVENT: ${{ toJson(github.event) }}
46+
- name: Launch Allure TestOps
47+
run: cd sample_app/android && bundle exec fastlane allure_launch
48+
env:
49+
GITHUB_EVENT: ${{ toJson(github.event) }}
4850

49-
# - name: Run e2e (Android emulator)
50-
# uses: reactivecircus/android-emulator-runner@v2
51-
# with:
52-
# api-level: ${{ env.android_api_level }}
53-
# arch: x86_64
54-
# profile: pixel_6
55-
# script: cd sample_app/android && bundle exec fastlane run_e2e_test device:emulator-5554
51+
- name: Run e2e (Android emulator)
52+
uses: reactivecircus/android-emulator-runner@v2
53+
with:
54+
api-level: ${{ env.android_api_level }}
55+
arch: x86_64
56+
profile: pixel_6
57+
script: cd sample_app/android && bundle exec fastlane run_e2e_test device:emulator-5554
5658

57-
# - name: Upload Allure results
58-
# if: env.ALLURE_LAUNCH_ID != '' && (success() || failure())
59-
# run: cd sample_app/android && bundle exec fastlane allure_upload
59+
- name: Upload Allure results
60+
if: env.ALLURE_LAUNCH_ID != '' && (success() || failure())
61+
run: cd sample_app/android && bundle exec fastlane allure_upload
6062

61-
# - name: Allure TestOps Launch Removal
62-
# if: env.ALLURE_LAUNCH_ID != '' && cancelled()
63-
# run: cd sample_app/android && bundle exec fastlane allure_launch_removal launch_id:$ALLURE_LAUNCH_ID
63+
- name: Allure TestOps Launch Removal
64+
if: env.ALLURE_LAUNCH_ID != '' && cancelled()
65+
run: cd sample_app/android && bundle exec fastlane allure_launch_removal launch_id:$ALLURE_LAUNCH_ID
6466

65-
# - uses: actions/upload-artifact@v7
66-
# if: failure()
67-
# with:
68-
# name: e2e-android-logs
69-
# path: |
70-
# sample_app/stream-chat-test-mock-server/logs
71-
# sample_app/build/e2e-test.log
67+
- uses: actions/upload-artifact@v7
68+
if: failure()
69+
with:
70+
name: e2e-android-logs
71+
path: |
72+
sample_app/stream-chat-test-mock-server/logs
73+
sample_app/build/e2e-test.log
7274
7375
ios:
7476
runs-on: macos-15
@@ -81,6 +83,8 @@ jobs:
8183

8284
- uses: ./.github/actions/setup-ruby
8385

86+
- run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
87+
8488
- name: Bootstrap
8589
run: |
8690
flutter precache --ios

.github/workflows/e2e_test_cron.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040

4141
- uses: ./.github/actions/setup-flutter
4242

43+
- run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
44+
4345
- name: Bootstrap
4446
run: |
4547
flutter pub global activate melos
@@ -101,6 +103,8 @@ jobs:
101103

102104
- uses: ./.github/actions/setup-flutter
103105

106+
- run: cp sample_app/pubspec_overrides.e2e.yaml sample_app/pubspec_overrides.yaml
107+
104108
- name: Bootstrap
105109
run: |
106110
flutter precache --ios

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ GeneratedPluginRegistrant.*
8282
**/ios/Runner/GeneratedPluginRegistrant.*
8383
**/ios/Flutter/ephemeral/**
8484
Podfile.lock
85+
sample_app/pubspec_overrides.yaml
8586
**/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
8687

8788
# Exceptions to iOS rules

sample_app/fastlane/Fastfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ private_lane :sources_matrix do
143143
{
144144
e2e: [
145145
'sample_app',
146+
'sample_app/firebase_stubs',
147+
'sample_app/pubspec_overrides.e2e.yaml',
146148
'packages',
147149
'melos.yaml',
148150
'.github/workflows/e2e_test.yml',
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
class Firebase {
2+
static Future<FirebaseApp> initializeApp({FirebaseOptions? options}) async => FirebaseApp();
3+
}
4+
5+
class FirebaseApp {}
6+
7+
class FirebaseOptions {
8+
const FirebaseOptions({
9+
required this.apiKey,
10+
required this.appId,
11+
required this.messagingSenderId,
12+
required this.projectId,
13+
this.authDomain,
14+
this.databaseURL,
15+
this.storageBucket,
16+
this.iosBundleId,
17+
this.iosClientId,
18+
this.androidClientId,
19+
this.measurementId,
20+
});
21+
22+
final String apiKey;
23+
final String appId;
24+
final String messagingSenderId;
25+
final String projectId;
26+
final String? authDomain;
27+
final String? databaseURL;
28+
final String? storageBucket;
29+
final String? iosBundleId;
30+
final String? iosClientId;
31+
final String? androidClientId;
32+
final String? measurementId;
33+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: firebase_core
2+
publish_to: none
3+
version: 0.0.0
4+
5+
environment:
6+
sdk: ^3.11.0
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import 'package:flutter/foundation.dart';
2+
3+
class FirebaseCrashlytics {
4+
static final instance = FirebaseCrashlytics._();
5+
FirebaseCrashlytics._();
6+
7+
Future<void> setCrashlyticsCollectionEnabled(bool enabled) async {}
8+
9+
void recordFlutterFatalError(FlutterErrorDetails details) {}
10+
11+
Future<void> recordError(
12+
Object? error,
13+
StackTrace? stack, {
14+
bool fatal = false,
15+
String? reason,
16+
}) async {}
17+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: firebase_crashlytics
2+
publish_to: none
3+
version: 0.0.0
4+
5+
environment:
6+
sdk: ^3.11.0
7+
flutter: ">=3.41.0"
8+
9+
dependencies:
10+
flutter:
11+
sdk: flutter
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
enum AuthorizationStatus { authorized, denied, notDetermined, provisional }
2+
3+
class NotificationSettings {
4+
const NotificationSettings({required this.authorizationStatus});
5+
final AuthorizationStatus authorizationStatus;
6+
}
7+
8+
class RemoteMessage {
9+
const RemoteMessage({this.data = const {}});
10+
final Map<String, dynamic> data;
11+
}
12+
13+
class FirebaseMessaging {
14+
static final instance = FirebaseMessaging._();
15+
FirebaseMessaging._();
16+
17+
static Stream<RemoteMessage> get onMessage => const Stream.empty();
18+
static Stream<RemoteMessage> get onMessageOpenedApp => const Stream.empty();
19+
static void onBackgroundMessage(Future<void> Function(RemoteMessage) handler) {}
20+
21+
Stream<String> get onTokenRefresh => const Stream.empty();
22+
Future<String?> getToken() async => null;
23+
Future<String?> getAPNSToken() async => null;
24+
Future<RemoteMessage?> getInitialMessage() async => null;
25+
Future<NotificationSettings> requestPermission() async =>
26+
const NotificationSettings(authorizationStatus: AuthorizationStatus.denied);
27+
28+
Future<void> setForegroundNotificationPresentationOptions({
29+
bool alert = false,
30+
bool badge = false,
31+
bool sound = false,
32+
}) async {}
33+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
name: firebase_messaging
2+
publish_to: none
3+
version: 0.0.0
4+
5+
environment:
6+
sdk: ^3.11.0

0 commit comments

Comments
 (0)