Skip to content

Update codecov/codecov-action action to v4.0.1 #2277

Update codecov/codecov-action action to v4.0.1

Update codecov/codecov-action action to v4.0.1 #2277

Workflow file for this run

name: Flutter
on:
push:
branches:
- master
pull_request:
branches-ignore:
- release/beta
- release/master
permissions:
contents: read
jobs:
unit_test:
name: Unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/dependency-review-action@4901385134134e04cec5fbe5ddfe3b2c5bd5d976 # v4.0.0
if: github.base_ref
- name: Setup Flutter
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0
with:
cache: true
- run: dart format --set-exit-if-changed --output none .
- run: ./tool/test.sh --coverage
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: failure()
with:
name: failures
path: '**/failures/'
- uses: codecov/codecov-action@e0b68c6749509c5f83f984dd99a76a1c1a231044 # v4.0.1
integration_test_android:
strategy:
matrix:
include:
- api-level: 30
arch: x86
channel: canary
target: aosp_atd
name: Integration test (Android)
runs-on: macos-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Flutter
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.0
with:
cache: true
- name: Gradle cache
uses: gradle/gradle-build-action@3b1b3b9a2104c2b47fbae53f3938079c00c9bb87 # v3.0.0
with:
# only update gradle cache from demo_app.yml jobs
cache-read-only: false
- name: AVD cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
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-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Flutter
uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 # v2.12.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