Skip to content

Commit c695153

Browse files
authored
Merge branch 'ml-opensource:master' into chore/update-dependencies
2 parents caf6b86 + 6c96629 commit c695153

File tree

2 files changed

+51
-17
lines changed

2 files changed

+51
-17
lines changed
Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
1-
# This workflow builds, analyses and tests every pull request.
1+
# This workflow builds, analyzes, and tests every pull request.
22
name: Pull Request Validation
3-
on: pull_request
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
- master
9+
10+
pull_request:
11+
412
jobs:
513
analyze-and-test:
614
runs-on: ubuntu-latest
715
steps:
8-
- uses: actions/checkout@v1
9-
- uses: actions/setup-java@v1
16+
- name: 📚 Git Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: 🐦 Setup Flutter
20+
uses: subosito/flutter-action@v2
1021
with:
11-
java-version: "12.x"
12-
- uses: subosito/flutter-action@v1
13-
with:
14-
channel: "stable"
15-
- run: flutter pub get
16-
- run: flutter pub run build_runner build --delete-conflicting-outputs
17-
- run: flutter build apk --release --flavor production -t lib/main_production.dart
18-
- run: flutter analyze
19-
- run: flutter test
22+
channel: 'stable'
23+
cache: true
24+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
25+
26+
- name: 📦 Install Dependencies
27+
run: flutter pub get
28+
29+
- name: 🛠️ Build Runner (Generate Code)
30+
run: flutter pub run build_runner build --delete-conflicting-outputs
31+
32+
- name: 🕵️ Analyze Code
33+
run: flutter analyze lib test
34+
35+
- name: ✨ Check Formatting
36+
run: dart format --line-length 80 --set-exit-if-changed lib test
37+
38+
- name: 🏗️ Build APK (Production Flavor)
39+
run: flutter build apk --release --flavor production -t lib/main_production.dart
40+
41+
- name: 🧪 Run Tests
42+
run: flutter test

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
# App name - Flutter
22

33
## 📖 Project description
4+
45
This project serves as a template project for Flutter applications. You can generate a new repository by clicking "Use this template" above.
56

67
## 🔧 Setup and Installation
8+
79
- Execute `$ flutter doctor` to verify installations
810
- Execute `$ pub get` to pull project dependencies
911
- Execute a run configuration of choice
10-
- `$ flutter run --flavor staging -t lib/main_staging.dart`
11-
- `$ flutter run --flavor production -t lib/main_production.dart`
12+
- `$ flutter run --flavor development -t lib/main_development.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_development_keys.json`
13+
- `$ flutter run --flavor staging -t lib/main_staging.dart --dart-define-from-file=lib/config/dart_define_keys/dart_define_staging_keys.json`
14+
15+
⚠️ **Running the Production Flavor**
16+
17+
It is **not recommended** to run the production flavor directly from the IDE
18+
(VS Code or Android Studio) as it may be run by mistake. For ease and accuracy,
19+
it is advised to run flavors via the **VS Code launch menu** or the **Android
20+
Studio Run menu** instead.
1221

1322
## 🌲 Branches
14-
* `master` - Latest version in the app store.
15-
* `develop` - Default. Feature branches are merged in when complete and then deleted.
23+
24+
- `master` - Latest version in the app store.
25+
- `develop` - Default. Feature branches are merged in when complete and then deleted.
1626

1727
## 🔗 Useful links
28+
1829
- [Jira Board](https://TODO)
1930
- [Confluence](https://TODO)
2031
- [Slack Channel](https://TODO)

0 commit comments

Comments
 (0)