Test #1634
Workflow file for this run
This file contains 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: flutter integration tests | |
on: | |
# Currently broken, enable after fixing | |
# workflow_dispatch | |
# TODO: this is only for testing | |
push: | |
# push: | |
# branches: | |
# - main | |
# - release/** | |
# pull_request: | |
# paths-ignore: | |
# - 'file/**' | |
jobs: | |
cancel-previous-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected] | |
with: | |
access_token: ${{ github.token }} | |
test-android: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
working-directory: ./flutter/example | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: [ "stable", "beta" ] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "adopt" | |
java-version: "17" | |
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] | |
with: | |
channel: ${{ matrix.sdk }} | |
- name: flutter upgrade | |
run: flutter upgrade | |
- name: flutter pub get | |
run: flutter pub get | |
- name: Gradle cache | |
uses: gradle/gradle-build-action@982da8e78c05368c70dac0351bb82647a9e9a5d2 # [email protected] | |
# - name: AVD cache | |
# uses: actions/cache@v4 | |
# id: avd-cache | |
# with: | |
# path: | | |
# ~/.android/avd/* | |
# ~/.android/adb* | |
# key: avd-21 | |
- name: create AVD and generate snapshot for caching | |
if: steps.avd-cache.outputs.cache-hit != 'true' | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected] | |
with: | |
working-directory: ./flutter/example | |
api-level: 21 | |
force-avd-creation: false | |
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: false | |
arch: x86_64 | |
profile: Nexus 6 | |
script: echo 'Generated AVD snapshot for caching.' | |
- name: launch android emulator & run android integration test | |
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b #[email protected] | |
with: | |
working-directory: ./flutter/example | |
api-level: 21 | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
disable-animations: true | |
arch: x86_64 | |
profile: Nexus 6 | |
script: flutter test integration_test/integration_test.dart --verbose | |
test-ios: | |
runs-on: macos-13 | |
timeout-minutes: 30 | |
defaults: | |
run: | |
working-directory: ./flutter/example | |
strategy: | |
fail-fast: false | |
matrix: | |
# 'beta' is flaky because of https://github.com/flutter/flutter/issues/124340 | |
sdk: [ "stable" ] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # [email protected] | |
with: | |
channel: ${{ matrix.sdk }} | |
- name: flutter upgrade | |
run: flutter upgrade | |
- name: flutter pub get | |
run: flutter pub get | |
- name: launch ios simulator | |
run: | | |
simulator_id=$(xcrun simctl create sentryPhone com.apple.CoreSimulator.SimDeviceType.iPhone-14 com.apple.CoreSimulator.SimRuntime.iOS-16-2) | |
xcrun simctl boot ${simulator_id} | |
- name: run ios integration test | |
run: flutter test integration_test/integration_test.dart --verbose |