Skip to content

Commit

Permalink
Copy workflow file to top github directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sayayayayaya committed Oct 2, 2023
1 parent 72d3bba commit 7faeb48
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/github-actions-concept.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: GitHub Actions Concept
run-name: Android instrumentation tests proof of concept
on: [push]

jobs:
connected-tests:
runs-on: macos-latest

strategy:
matrix:
api-level: [26, 28, 30, 33]
target: [google_apis]
arch: [x86_64]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'adopt'
cache: 'gradle'

- 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: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
working-directory: ./sdk/android
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 connected tests
uses: ReactiveCircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
working-directory: ./sdk/android
force-avd-creation: false
avd-name: android-samples-avd
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedCheck

0 comments on commit 7faeb48

Please sign in to comment.