From dfbc691620d0a68fc38a3d78071333242c3c3036 Mon Sep 17 00:00:00 2001 From: Wojtek Zieba Date: Sat, 28 Oct 2023 00:01:50 +0200 Subject: [PATCH] ci: run functional tests on CI On a separate job, as it has to run on macOS. Use cache for Android Emulator dependencies. --- .github/workflows/readme.yml | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml index 59e66bed..e7dd5e90 100644 --- a/.github/workflows/readme.yml +++ b/.github/workflows/readme.yml @@ -43,3 +43,41 @@ jobs: with: name: artifact path: ~/.m2/repository/com/parsely/parsely/* + functional-tests: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: set up JDK + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + - name: AVD cache + uses: actions/cache@v3 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-31 + - name: Functional Tests + uses: reactivecircus/android-emulator-runner@v2.28.0 + with: + working-directory: . + api-level: 31 + profile: Nexus 6 + arch: x86_64 + force-avd-creation: false + avd-name: macOS-avd-x86_64-31 + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: ./gradlew connectedCheck + - name: Publish build artifacts + uses: actions/upload-artifact@v3 + if: always() + with: + name: artifact + path: ~/parsely-android/parsely-android/parsely/build/reports/*