Refactor CI workflow for clarity and updates #21
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: FlutterJS CI | |
| on: | |
| push: | |
| branches: ["main", "master"] | |
| pull_request: | |
| branches: ["main", "master"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout repo | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| # Install Flutter (FORCE 3.29, avoid old 3.22 cache) | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: "3.29.0" | |
| channel: stable | |
| cache: true | |
| cache-key: flutter-3.29.0 | |
| # Debug — verify correct Flutter & Dart | |
| - name: Verify Flutter & Dart versions | |
| run: | | |
| echo "Flutter path:" | |
| which flutter | |
| echo "Flutter version:" | |
| flutter --version | |
| echo "Dart version:" | |
| dart --version | |
| # Install dependencies (workspace aware) | |
| - name: Install dependencies | |
| run: flutter pub get | |
| # Check formatting | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| # Static analysis | |
| - name: Analyze project | |
| run: flutter analyze | |
| # Run tests | |
| - name: Run tests | |
| run: flutter test |