fix(commands): resolve all /compact and /model review issues #7
Workflow file for this run
This file contains hidden or 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
| name: Flutter Security + Lint CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'app/**' | |
| - '.github/workflows/flutter-ci.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'app/**' | |
| - '.github/workflows/flutter-ci.yml' | |
| jobs: | |
| lint-and-analyze: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.22.0' | |
| channel: 'stable' | |
| - name: Cache Flutter dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ${{ runner.tool_cache }}/flutter/ | |
| ~/.pub-cache/ | |
| key: ${{ runner.os }}-flutter-${{ hashFiles('app/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-flutter- | |
| - name: Install Flutter dependencies (offline, lockfile-locked) | |
| run: | | |
| cd app | |
| flutter pub get --offline | |
| - name: Run analysis (strict linting) | |
| run: | | |
| cd app | |
| flutter analyze --no-pub | |
| - name: Check code formatting | |
| run: | | |
| cd app | |
| dart format --output=none --set-exit-if-changed lib test | |
| - name: Check for vulnerable packages | |
| run: | | |
| cd app | |
| flutter pub outdated --mode=null-safety || true | |
| continue-on-error: true # Advisory only, doesn't block CI | |
| - name: Verify pubspec.lock integrity | |
| run: | | |
| cd app | |
| if ! git diff --exit-code pubspec.lock > /dev/null; then | |
| echo "ERROR: pubspec.lock would be modified by pub get" | |
| echo "This indicates a lockfile inconsistency or manual edit." | |
| echo "Run: flutter pub get && git add pubspec.lock" | |
| exit 1 | |
| fi | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.22.0' | |
| channel: 'stable' | |
| - name: Install Flutter dependencies | |
| run: | | |
| cd app | |
| flutter pub get --offline | |
| - name: Run tests | |
| run: | | |
| cd app | |
| flutter test --coverage | |
| continue-on-error: true # Tests are informational; CI passes even if they fail | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./app/coverage/lcov.info | |
| flags: flutter | |
| continue-on-error: true | |
| security-audit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.22.0' | |
| channel: 'stable' | |
| - name: Install Flutter dependencies | |
| run: | | |
| cd app | |
| flutter pub get --offline | |
| - name: Check for known CVEs in dependencies | |
| run: | | |
| cd app | |
| flutter pub outdated --mode=null-safety 2>&1 | tee /tmp/outdated.txt | |
| # Grep for known-critical packages (e.g., if any are severely outdated) | |
| if grep -i "is not available" /tmp/outdated.txt; then | |
| echo "WARNING: Some packages may have been yanked or are inaccessible." | |
| fi | |
| continue-on-error: true |