Skip to content

update color

update color #16

Workflow file for this run

name: Flutter Tests
on: pull_request
# 2 jobs are configured.
# The first one runs tests on iOS devices.
# The second runs tests on Android devices
jobs:
# job responsible for running Flutter tests on iOS devices
ios:
# Creates a build matrix for your jobs. You can define different variations of an environment to run each job
strategy:
matrix:
device:
# The available simulators are listed by the "xcrun xctrace list devices" command
- "iPhone 11 Simulator (15.2)" # the name of the simulator could be different depending on the macos version you are using
# if one of the jobs in the matrix expansion fails, the rest of the jobs will be cancelled
fail-fast: true
runs-on: macos-11 # or macos-latest if you prefer, but be aware that the available simulators could be different if you run a different version
steps:
- name: "List all simulators"
run: "xcrun xctrace list devices"
- name: "Start Simulator"
# the command "xcrun simctl boot" expects a device identifier
# the assignment of the UDID variable consists of retrieving the ID of the simulator
# by extracting it from the command "xcrun xctrace list devices"
run: |
UDID=$(xcrun xctrace list devices | grep "^${{ matrix.device }}" | awk '{gsub(/[()]/,""); print $NF}')
echo $UDID
xcrun simctl boot "${UDID:?No Simulator with this name found}"
- uses: actions/checkout@v3
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: stable
# instead of "channel: stable", you could be more precise by specifying the exact version of Flutter you're using:
# flutter-version: '<FLUTTER_VERSION>'
- name: Install Flutter dependencies
run: flutter pub get
- name: Run integration tests
run: flutter test integration_tests --verbose
# # job responsible for running Flutter tests on Android devices
# android:
# runs-on: macos-11
# strategy:
# matrix:
# api-level:
# - 29
# # you can add more API level if you want to run your tests on different API
# fail-fast: true
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# distribution: temurin
# java-version: 11
# - name: Setup Gradle
# uses: gradle/gradle-build-action@v2
# - name: AVD cache
# uses: actions/cache@v3
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-${{ matrix.api-level }}
# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{ matrix.api-level }}
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: false
# script: echo "Generated AVD snapshot for caching."
# - name: Setup Flutter SDK
# uses: subosito/flutter-action@v2
# with:
# channel: stable
# # instead of "channel: stable", you could be more precise by specifying the exact version of Flutter you're using:
# # flutter-version: '<FLUTTER_VERSION>'
# - name: Install Flutter dependencies
# run: flutter pub get
# - name: Run integration tests
# # more info on https://github.com/ReactiveCircus/android-emulator-runner
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{ matrix.api-level }}
# ndk: 21.0.6113669
# arch: x86_64
# profile: Nexus 6
# script: flutter test integration_tests --verbose