Skip to content
Merged
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
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