-
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.
feat: Added Github Actions Step Name & Organized Sequence
- Loading branch information
1 parent
d9aeb69
commit 7196992
Showing
1 changed file
with
36 additions
and
13 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 |