Merge branch 'dev' into feature/session-persistence-424

This commit is contained in:
2026-02-20 20:56:18 +05:30
committed by GitHub
22 changed files with 1296 additions and 132 deletions

View File

@@ -29,10 +29,10 @@ jobs:
id: detect
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
# For PR, compare with base branch
# For PR, compare all changes against base branch (not just latest commit)
# Using three-dot syntax (...) shows all files changed in the PR branch
BASE_REF="${{ github.event.pull_request.base.ref }}"
HEAD_REF="${{ github.event.pull_request.head.ref }}"
CHANGED_FILES=$(git diff --name-only origin/$BASE_REF..origin/$HEAD_REF 2>/dev/null || echo "")
CHANGED_FILES=$(git diff --name-only origin/$BASE_REF...HEAD 2>/dev/null || echo "")
else
# For push, compare with previous commit
if [[ "${{ github.event.before }}" == "0000000000000000000000000000000000000000" ]]; then
@@ -74,39 +74,47 @@ jobs:
- name: 🦋 Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.x'
flutter-version: '3.38.x'
channel: 'stable'
cache: true
- name: 🔧 Install Firebase CLI
run: |
npm install -g firebase-tools
- name: 📦 Get Flutter dependencies
run: |
cd apps/mobile
flutter pub get
make mobile-install
- name: 🔨 Run compilation check
run: |
cd apps/mobile
echo "⚙️ Running build_runner..."
flutter pub run build_runner build --delete-conflicting-outputs 2>&1 || true
echo ""
echo "🔬 Running flutter analyze on all files..."
flutter analyze lib/ --no-fatal-infos 2>&1 | tee analyze_output.txt || true
set -o pipefail
echo "🏗️ Building client app for Android (dev mode)..."
if ! make mobile-client-build PLATFORM=apk MODE=debug 2>&1 | tee client_build.txt; then
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "❌ CLIENT APP BUILD FAILED"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
exit 1
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Check for actual errors (not just warnings)
if grep -E "^\s*(error|SEVERE):" analyze_output.txt > /dev/null; then
echo "❌ COMPILATION ERRORS FOUND:"
echo "🏗️ Building staff app for Android (dev mode)..."
if ! make mobile-staff-build PLATFORM=apk MODE=debug 2>&1 | tee staff_build.txt; then
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
grep -B 2 -A 1 -E "^\s*(error|SEVERE):" analyze_output.txt | sed 's/^/ /'
echo "❌ STAFF APP BUILD FAILED"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
exit 1
else
echo "✅ Compilation check PASSED - No errors found"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "✅ Build check PASSED - Both apps built successfully"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
lint:
name: 🧹 Lint Changed Files
@@ -120,18 +128,21 @@ jobs:
- name: 🦋 Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.x'
flutter-version: '3.38.x'
channel: 'stable'
cache: true
- name: 🔧 Install Firebase CLI
run: |
npm install -g firebase-tools
- name: 📦 Get Flutter dependencies
run: |
cd apps/mobile
flutter pub get
make mobile-install
- name: 🔍 Lint changed Dart files
run: |
cd apps/mobile
set -o pipefail
# Get the list of changed files
CHANGED_FILES="${{ needs.detect-changes.outputs.changed-files }}"
@@ -153,7 +164,7 @@ jobs:
if [[ -n "$file" && "$file" == *.dart && -f "$file" ]]; then
echo "📝 Analyzing: $file"
if ! flutter analyze "$file" --no-fatal-infos 2>&1 | tee -a lint_output.txt; then
if ! dart analyze "$file" 2>&1 | tee -a lint_output.txt; then
HAS_ERRORS=true
FAILED_FILES+=("$file")
fi