Skip to content

Commit

Permalink
Update flow: Run emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
devnta committed Jan 25, 2024
1 parent db501f1 commit f6048f8
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ jobs:
build:
name: Run integration test
runs-on: macOS-latest
strategy:
matrix:
api-level: [ 21, 33 ]
target: [ google_apis ]
arch: [ x86_64 ]
steps:
- name: Checkout
uses: actions/[email protected]
Expand All @@ -16,11 +21,37 @@ jobs:
uses: subosito/[email protected]
with:
channel: 'stable'
- name: Create emulator
- name: Gradle cache
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: 29
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
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
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
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: ./gradlew connectedAndroidTest
- run: flutter doctor -v
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
Expand Down

0 comments on commit f6048f8

Please sign in to comment.