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
101 changes: 101 additions & 0 deletions .github/workflows/flutter_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Flutter CI/CD

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
analyze:
name: Dart Analyze
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'

- name: Install dependencies
run: flutter pub get

- name: Run analyzer
run: flutter analyze

test:
name: Run Tests
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'

- name: Install dependencies
run: flutter pub get

- name: Run tests
run: flutter test

build-android:
name: Build Android APK
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'

- name: Install dependencies
run: flutter pub get

- name: Build APK
run: flutter build apk --release

- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: app-release-apk
path: build/app/outputs/flutter-apk/app-release.apk

build-ios:
name: Build iOS App
runs-on: macos-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

steps:
- uses: actions/checkout@v3

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.4'

- name: Install dependencies
run: flutter pub get

- name: Build iOS
run: flutter build ios --release --no-codesign

- name: Zip .app for download
run: |
mkdir -p ios-artifact
zip -r ios-artifact/Runner.app.zip build/ios/iphoneos/Runner.app

- name: Upload iOS App
uses: actions/upload-artifact@v4
with:
name: ios-app
path: ios-artifact/Runner.app.zip
1 change: 1 addition & 0 deletions lib/features/landing/presentation/view/landing_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class _LandingPageState extends State<LandingPage> with SingleTickerProviderStat
});

Future.delayed(const Duration(seconds: 3), () {
//ignore: use_build_context_synchronously
context.go('/home', extra: 'landing');
});
}
Expand Down
3 changes: 2 additions & 1 deletion test/core/data/firebase_generic_datasource_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import 'package:devcon_hub/core/data/firebase_datasource.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:mocktail/mocktail.dart';

// --- Mock Classes ---
// ignore_for_file: subtype_of_sealed_class

class MockFirebaseFirestore extends Mock implements FirebaseFirestore {}

class MockCollectionReference extends Mock implements CollectionReference<Map<String, dynamic>> {}
Expand Down
1 change: 1 addition & 0 deletions test/features/agenda/presentation/agenda_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ void main() {

when(() => mockUseCase.call(null)).thenAnswer((_) async => agendaItems);
when(() => mockCubit.execute()).thenAnswer((_) async {});
when(() => mockCubit.close()).thenAnswer((_) async {});
});

tearDownAll(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void main() {

when(() => mockUseCase.call(null)).thenAnswer((_) async => resources);
when(() => mockCubit.execute()).thenAnswer((_) async {});
when(() => mockCubit.close()).thenAnswer((_) async {});
});

tearDownAll(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void main() {

when(() => mockUseCase.call(null)).thenAnswer((_) async => speakers);
when(() => mockCubit.execute()).thenAnswer((_) async {});
when(() => mockCubit.close()).thenAnswer((_) async {});
});

tearDownAll(() {
Expand Down
29 changes: 0 additions & 29 deletions test/widget_test.dart

This file was deleted.