Skip to content

Update codecov/codecov-action action to v4.2.0 #2339

Update codecov/codecov-action action to v4.2.0

Update codecov/codecov-action action to v4.2.0 #2339

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@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5
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@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: failures
path: '**/failures/'
- uses: codecov/codecov-action@7afa10ed9b269c561c2336fd862446844e0cbf71 # v4.2.0
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-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Flutter
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
cache: true
- name: Gradle cache
uses: gradle/gradle-build-action@fe59895742b4f984530980e4f693943577526b61 # v3.2.0
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-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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