Skip to content

Merge pull request #40 from Zenxlk/fix/online-game-event-crash #94

Merge pull request #40 from Zenxlk/fix/online-game-event-crash

Merge pull request #40 from Zenxlk/fix/online-game-event-crash #94

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze_and_test:
name: Analyze & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.44.4'
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
# .env está declarado como asset en pubspec.yaml (Fase 7, Supabase
# Auth) y no se versiona — sin este placeholder, analyze/build fallan
# con "asset_does_not_exist" en cualquier checkout limpio. Vacío es
# intencional: CI corre en modo invitado, no necesita credenciales
# reales (ver docs/ARCHITECTURE.md, sección "Autenticación con
# Supabase").
- name: Create placeholder .env
run: cp .env.example .env
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze
run: flutter analyze --fatal-infos
- name: Run tests with coverage
run: flutter test --coverage --reporter=github
- name: Upload coverage artifact
uses: actions/upload-artifact@v7
with:
name: coverage-report
path: coverage/lcov.info
retention-days: 14
- name: Upload coverage to Codecov
if: github.event_name == 'push'
uses: codecov/codecov-action@v7
with:
file: coverage/lcov.info
fail_ci_if_error: false