Skip to content

Prepare v0.15.0 releases #2404

Prepare v0.15.0 releases

Prepare v0.15.0 releases #2404

Workflow file for this run

name: Flutter
on:
push:
branches:
- master
pull_request:
branches-ignore:
- release/beta
- release/master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
unit_test:
name: Unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/dependency-review-action@0c155c5e8556a497adf53f2c18edabf945ed8e70 # v4.3.2
if: github.base_ref
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- run: dart format --set-exit-if-changed --output none .
- name: Run chromedriver
run: |
set -e
chromedriver --port=4444 &
echo CHROMEDRIVER_PORT_4444=yes >$GITHUB_ENV
- run: ./tool/test.sh --coverage
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
if: failure()
with:
name: failures
path: "**/failures/"
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
integration_test_android:
strategy:
matrix:
include:
- api-level: 30
arch: x86
channel: canary
target: aosp_atd
name: Integration test (Android)
runs-on: macos-13
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- name: Gradle cache
uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v3.3.2
with:
# only update gradle cache from demo_app.yml jobs
cache-read-only: false
- name: AVD cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
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@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
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: Run tests on Android emulator
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 # v2.30.1
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
channel: ${{ matrix.channel }}
target: ${{ matrix.target }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./tool/integration.sh
integration_test_ios:
name: Integration test (iOS)
runs-on: macos-12
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- name: Create iOS simulator
run: |
set -e
_runtime=$(xcrun simctl list runtimes ios -j | jq -r '.runtimes[-1]')
_runtimeId=$(echo $_runtime | jq -r .identifier)
echo "_runtimeId=$_runtimeId"
_deviceType=$(echo $_runtime | jq -r '.supportedDeviceTypes[-1]')
_deviceTypeName=$(echo $_deviceType | jq -r .name)
echo "_deviceTypeName=$_deviceTypeName"
_deviceTypeId=$(echo $_deviceType | jq -r .identifier)
echo "_deviceTypeId=$_deviceTypeId"
xcrun simctl create "$_deviceTypeName" "$_deviceTypeId" "$_runtimeId" | xargs xcrun simctl boot
- name: Run tests on iOS simulator
run: ./tool/integration.sh