fix(yml): update dependabot.yml #428
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: CI/CD Pipeline | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| setup-env: | |
| name: Setup Environment Variables | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| flutter-version: ${{ steps.env.outputs.flutter-version }} | |
| node-version: ${{ steps.env.outputs.node-version }} | |
| steps: | |
| - name: π Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: π§ Load environment variables | |
| id: env | |
| run: | | |
| # Lire les variables depuis .env.example | |
| FLUTTER_VERSION=$(grep "FLUTTER_VERSION=" .env.example | cut -d '=' -f2) | |
| NODE_VERSION=$(grep "NODE_VERSION=" .env.example | cut -d '=' -f2) | |
| echo "flutter-version=$FLUTTER_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "node-version=$NODE_VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Flutter version: $FLUTTER_VERSION" | |
| echo "Node version: $NODE_VERSION" | |
| lint-and-test: | |
| name: Lint & Test | |
| runs-on: ubuntu-24.04 | |
| needs: setup-env | |
| timeout-minutes: 30 | |
| steps: | |
| - name: π Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Setup Task | |
| uses: go-task/setup-task@v1 | |
| - name: ποΈ Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ needs.setup-env.outputs.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: 'package-lock.json' | |
| - name: π¦ Install Node.js dependencies | |
| run: npm install | |
| - name: Lint all | |
| run: task lint:all | |
| - name: ποΈ Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ needs.setup-env.outputs.flutter-version }} | |
| cache: true | |
| - name: π¦ Get Flutter dependencies | |
| working-directory: apps | |
| run: flutter pub get | |
| - name: π Analyze Flutter code | |
| working-directory: apps | |
| run: flutter analyze | |
| - name: π§ͺ Run Flutter tests | |
| working-directory: apps | |
| run: flutter test --coverage | |
| - name: π Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: apps/coverage/lcov.info | |
| flags: flutter | |
| fail_ci_if_error: false | |
| build: | |
| name: Build Applications | |
| runs-on: ubuntu-24.04 | |
| needs: [setup-env, lint-and-test] | |
| if: github.event_name == 'push' | |
| timeout-minutes: 45 | |
| strategy: | |
| matrix: | |
| platform: [android, web] | |
| steps: | |
| - name: π Checkout repository | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: ποΈ Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ needs.setup-env.outputs.flutter-version }} | |
| cache: true | |
| - name: π¦ Get Flutter dependencies | |
| working-directory: apps | |
| run: flutter pub get | |
| - name: ποΈ Build for ${{ matrix.platform }} | |
| working-directory: apps | |
| run: | | |
| if [ "${{ matrix.platform }}" == "android" ]; then | |
| flutter build apk --release | |
| elif [ "${{ matrix.platform }}" == "web" ]; then | |
| flutter build web --release | |
| fi | |
| - name: π€ Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }}-build | |
| path: | | |
| apps/build/app/outputs/flutter-apk/*.apk | |
| apps/build/web/ | |
| retention-days: 7 |