fix(build): storeFile via rootProject.file() (cohérence Files Tech / CI) #2
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Analyze + Test + Build (debug) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout app | |
| uses: actions/checkout@v6 | |
| with: | |
| path: notes_tech | |
| # Le pubspec référence files_tech_voice via `path: ../files_tech_voice`. | |
| # On le checkout en sibling pour que `flutter pub get` résolve la dep. | |
| - name: Checkout files_tech_voice (path dependency) | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: gitubpatrice/files_tech_voice | |
| path: files_tech_voice | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Flutter version | |
| run: flutter --version | |
| - name: Pub get | |
| working-directory: notes_tech | |
| run: flutter pub get | |
| - name: Analyze | |
| working-directory: notes_tech | |
| run: flutter analyze --no-fatal-infos | |
| - name: Run tests | |
| working-directory: notes_tech | |
| run: flutter test || echo "No tests yet" | |
| # Build debug APK pour valider que la compilation passe end-to-end | |
| # (pas besoin de keystore release en CI). | |
| - name: Build APK (debug, unsigned) | |
| working-directory: notes_tech | |
| run: flutter build apk --debug | |
| - name: Upload APK artifact | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: notes_tech-debug-${{ github.sha }} | |
| path: notes_tech/build/app/outputs/flutter-apk/app-debug.apk | |
| retention-days: 7 | |
| if-no-files-found: ignore |