Fastlane metadata content - Run tests (#122.1) - pull_request refs/pull/37/merge (from fastlane-update to main) #122
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: Run tests | |
| run-name: > | |
| ${{ github.event.pull_request.title }} - ${{ github.workflow }} (#${{ github.run_number }}.${{ github.run_attempt }}) - ${{ github.event_name }} ${{ github.ref }} (from ${{ github.head_ref }} to ${{ github.base_ref }}) | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| merge_group: | |
| types: [ checks_requested ] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| flutter_version: '3.35.2' | |
| java_version: '17' | |
| jobs: | |
| format: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: "Checkout repository code ⤵️" | |
| uses: actions/checkout@v3 | |
| - name: "Cache Flutter installation 💾" | |
| uses: actions/cache@v3 | |
| with: | |
| path: /opt/hostedtoolcache/flutter | |
| key: ${{ runner.os }}-flutter-install-cache-${{ env.flutter_version }} | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.flutter_version }} | |
| channel: 'stable' | |
| - name: Cache Flutter packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | # get FLUTTER_ROOT from flutter-action | |
| ${{ env.FLUTTER_ROOT }}/.pub-cache | |
| key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub-cache- | |
| - run: flutter config --no-analytics | |
| - run: flutter pub get | |
| - name: Format code | |
| run: dart format . --set-exit-if-changed | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Cache Flutter installation | |
| uses: actions/cache@v3 | |
| with: | |
| path: /opt/hostedtoolcache/flutter | |
| key: ${{ runner.os }}-flutter-install-cache-${{ env.flutter_version }} | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ env.flutter_version }} | |
| channel: 'stable' | |
| - name: Cache Flutter packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | # get FLUTTER_ROOT from flutter-action | |
| ${{ env.FLUTTER_ROOT }}/.pub-cache | |
| key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub-cache- | |
| - run: flutter --version | |
| - run: flutter config --no-analytics | |
| - run: flutter pub get | |
| - name: build the environment | |
| env: | |
| ANDROID_APP_ID: ${{ secrets.ANDROID_APP_ID }} | |
| ANDROID_BANNER_ID: ${{ secrets.ANDROID_BANNER_ID }} | |
| ANDROID_NATIVE_ID: ${{ secrets.ANDROID_NATIVE_ID }} | |
| IOS_APP_ID: ${{ secrets.IOS_APP_ID }} | |
| IOS_BANNER_ID: ${{ secrets.IOS_BANNER_ID }} | |
| IOS_NATIVE_ID: ${{ secrets.IOS_NATIVE_ID }} | |
| TEST_ADS: ${{ secrets.TEST_ADS }} | |
| run: dart tool/env.dart | |
| - name: Generate files (freezed, json_serializable) | |
| run: flutter pub run build_runner build --delete-conflicting-outputs | |
| - name: Activate flutter packages | |
| run: | | |
| flutter pub global activate intl_utils | |
| - name: Generate translations | |
| run: | | |
| flutter pub global run intl_utils:generate | |
| - name: Analyze code | |
| run: flutter analyze --no-fatal-infos --fatal-warnings | |
| - run: flutter test |