ci(all): Update Android build matrix, change emulator configs #497
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
| # Build Battery Plus Example | |
| name: battery_plus | |
| concurrency: | |
| group: battery_plus_${{ github.head_ref || github.ref_name }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| pull_request: | |
| paths: | |
| - "packages/battery_plus/**" | |
| - ".github/workflows/battery_plus.yaml" | |
| - "!**.md" | |
| - "!**.gitignore" | |
| env: | |
| PLUGIN_SCOPE: "*battery_plus*" | |
| PLUGIN_EXAMPLE_SCOPE: "*battery_plus_example*" | |
| jobs: | |
| analyze: | |
| name: "Dart Analyzer" | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: | | |
| ./.github/workflows/scripts/install-tools.sh | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap | |
| - name: "Run Dart Analyze" | |
| uses: invertase/github-action-dart-analyzer@v3 | |
| with: | |
| fatal-infos: false | |
| fatal-warnings: true | |
| annotate: true | |
| working-directory: ./packages/battery_plus | |
| android_example_build: | |
| runs-on: macos-15-intel | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh android ./lib/main.dart | |
| android_integration_test: | |
| runs-on: macos-15-intel | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| android-api-level: [ 24, 29, 32, 36 ] | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap --scope="$PLUGIN_SCOPE" | |
| - name: "Android Integration Test" | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.android-api-level }} | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: false | |
| profile: pixel_7_pro | |
| script: ./.github/workflows/scripts/integration-test.sh android battery_plus_example | |
| ios_example_build: | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh ios ./lib/main.dart | |
| ios_integration_test: | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap --scope="$PLUGIN_SCOPE" | |
| - name: "Start Simulator" | |
| uses: futureware-tech/simulator-action@v5 | |
| with: | |
| model: "iPhone 17" | |
| - name: "Run Integration Test" | |
| run: ./.github/workflows/scripts/integration-test.sh ios battery_plus_example | |
| macos_example_build: | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh macos ./lib/main.dart | |
| macos_integration_test: | |
| if: false # Disabled as battery_plus APIs don't complete in GitHub Actions macOS VMs. | |
| runs-on: macos-26 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap --scope="$PLUGIN_SCOPE" | |
| - name: "Run Integration Test" | |
| run: ./.github/workflows/scripts/integration-test.sh macos battery_plus_example | |
| linux_example_build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Install UPower" | |
| run: sudo apt install upower | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh linux ./lib/main.dart | |
| linux_integration_test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Install UPower" | |
| run: sudo apt install upower | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap --scope="$PLUGIN_SCOPE" | |
| - name: "Run Integration Test" | |
| run: ./.github/workflows/scripts/integration-test.sh linux battery_plus_example | |
| windows_example_build: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh windows ./lib/main.dart | |
| windows_integration_test: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Bootstrap Workspace" | |
| run: melos.bat bootstrap --scope="$PLUGIN_SCOPE" | |
| - name: "Run Integration Test" | |
| run: ./.github/workflows/scripts/integration-test.sh windows battery_plus_example | |
| web_example_build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: "Checkout repository" | |
| uses: actions/checkout@v6 | |
| - uses: flutter-actions/setup-flutter@v4 | |
| - name: "Install Tools" | |
| run: ./.github/workflows/scripts/install-tools.sh | |
| - name: "Build Example" | |
| run: ./.github/workflows/scripts/build-examples.sh web ./lib/main.dart |