Skip to content

Update actions/dependency-review-action action to v3.1.3 (#1096) #2135

Update actions/dependency-review-action action to v3.1.3 (#1096)

Update actions/dependency-review-action action to v3.1.3 (#1096) #2135

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@7bbfa034e752445ea40215fff1c3bf9597993d3f # v3.1.3
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
if: failure()
with:
name: failures
path: '**/failures/'
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
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@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
with:
# only update gradle cache from demo_app.yml jobs
cache-read-only: false
- name: AVD cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.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@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2.28.0
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@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2.28.0
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