Skip to content

Commit

Permalink
Merge branch 'ml-opensource:master' into chore/update-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
utpal-barman authored Oct 11, 2024
2 parents caf6b86 + 6c96629 commit c695153
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 17 deletions.
49 changes: 36 additions & 13 deletions .github/workflows/pull_request_validation.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,42 @@
# This workflow builds, analyses and tests every pull request.
# This workflow builds, analyzes, and tests every pull request.
name: Pull Request Validation
on: pull_request
on:
push:
branches:
- develop
- main
- master

pull_request:

jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
- name: πŸ“š Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
java-version: "12.x"
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter build apk --release --flavor production -t lib/main_production.dart
- run: flutter analyze
- run: flutter test
channel: 'stable'
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: πŸ“¦ Install Dependencies
run: flutter pub get

- name: πŸ› οΈ Build Runner (Generate Code)
run: flutter pub run build_runner build --delete-conflicting-outputs

- name: πŸ•΅οΈ Analyze Code
run: flutter analyze lib test

- name: ✨ Check Formatting
run: dart format --line-length 80 --set-exit-if-changed lib test

- name: πŸ—οΈ Build APK (Production Flavor)
run: flutter build apk --release --flavor production -t lib/main_production.dart

- name: πŸ§ͺ Run Tests
run: flutter test
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
# App name - Flutter

## πŸ“– Project description

This project serves as a template project for Flutter applications. You can generate a new repository by clicking "Use this template" above.

## πŸ”§ Setup and Installation

- Execute `$ flutter doctor` to verify installations
- Execute `$ pub get` to pull project dependencies
- Execute a run configuration of choice
- `$ flutter run --flavor staging -t lib/main_staging.dart`
- `$ flutter run --flavor production -t lib/main_production.dart`
- `$ flutter run --flavor development -t lib/main_development.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_development_keys.json`
- `$ flutter run --flavor staging -t lib/main_staging.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_staging_keys.json`

⚠️ **Running the Production Flavor**

It is **not recommended** to run the production flavor directly from the IDE
(VS Code or Android Studio) as it may be run by mistake. For ease and accuracy,
it is advised to run flavors via the **VS Code launch menu** or the **Android
Studio Run menu** instead.

## 🌲 Branches
* `master` - Latest version in the app store.
* `develop` - Default. Feature branches are merged in when complete and then deleted.

- `master` - Latest version in the app store.
- `develop` - Default. Feature branches are merged in when complete and then deleted.

## πŸ”— Useful links

- [Jira Board](https://TODO)
- [Confluence](https://TODO)
- [Slack Channel](https://TODO)
Expand Down

0 comments on commit c695153

Please sign in to comment.