Skip to content

flutter 3.27.0

flutter 3.27.0 #212

Workflow file for this run

# https://medium.com/flutter-community/run-flutter-driver-tests-on-github-actions-13c639c7e4ab
# https://github.com/nazarcybulskij/CI_CD_Flutter_Demo
# https://weilu.blog.csdn.net/article/details/114744416
# Name of your workflow.
name: flutter_deer driver
# Trigger the workflow on push or pull request.
on: [push, pull_request]
# A workflow run is made up of one or more jobs.
jobs:
# id of job, a string that is unique to the "jobs" node above.
drive_ios:
# Creates a build matrix for your jobs. You can define different
# variations of an environment to run each job in.
strategy:
# A set of different configurations of the virtual environment.
matrix:
device:
- "iPhone 15 Pro Max"
# When set to true, GitHub cancels all in-progress jobs if any matrix job
# fails.
fail-fast: false
# The type of machine to run the job on.
runs-on: macos-latest
# Contains a sequence of tasks.
steps:
# A name for your step to display on GitHub.
# - name: "List all simulators"
# run: "xcrun instruments -s"
# - name: "Start Simulator"
# run: |
# UDID=$(
# xcrun instruments -s |
# awk \
# -F ' *[][]' \
# -v 'device=${{ matrix.device }}' \
# '$1 == device { print $2 }'
# )
# xcrun simctl boot "${UDID:?No Simulator with this name found}"
- name: "Start Simulator"
# https://github.com/futureware-tech/simulator-action
uses: futureware-tech/simulator-action@v2
with:
model: ${{ matrix.device }}
erase_before_boot: true
shutdown_after_job: true
# The branch or tag ref that triggered the workflow will be checked out.
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v3
# Sets up a flutter environment.
# https://github.com/marketplace/actions/flutter-action
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.0'
channel: 'stable' # or: 'dev' or 'beta'
- run: "flutter clean"
- name: "Run Flutter Driver tests"
run: "flutter drive --target=test_driver/driver.dart --no-enable-impeller" #https://github.com/flutter/flutter/issues/128391
drive_android:
# The type of machine to run the job on.
runs-on: macos-latest
# creates a build matrix for your jobs
strategy:
# set of different configurations of the virtual environment.
matrix:
api-level: [29, 34]
target: [google_apis]
steps:
- uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "oracle"
java-version: "17"
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.0'
channel: 'stable' # or: 'dev' or 'beta'
- name: "Run Flutter Driver tests"
# GitHub Action for installing, configuring and running Android Emulators (work only Mac OS)
# https://github.com/marketplace/actions/android-emulator-runner
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: arm64-v8a
profile: Nexus 6
script: "flutter drive --target=test_driver/driver.dart"
accessibility_test:
#The type of machine to run the job on. [windows,macos, ubuntu , self-hosted]
runs-on: macos-latest
#sequence of tasks called
steps:
# The branch or tag ref that triggered the workflow will be checked out.
# https://github.com/actions/checkout
- uses: actions/checkout@v3
# Setup a flutter environment.
# https://github.com/marketplace/actions/flutter-action
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.0'
channel: 'stable'
- run: "flutter pub get"
- name: "Run Flutter Accessibility Tests"
run: "flutter test test/accessibility_test.dart"