-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ml-opensource:master' into chore/update-dependencies
- Loading branch information
Showing
2 changed files
with
51 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters