From f8f07288ddf29738802786ec662af234dc635dd5 Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 1 Mar 2022 23:53:39 +0800 Subject: [PATCH 1/3] Update README for using with gradle/gradle-build-action --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 0864cff06..4fa4e3e1d 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,9 @@ jobs: script: ./gradlew connectedCheck ``` +Note: if you want to use [gradle-build-action](https://github.com/gradle/gradle-build-action) with `reactivecircus/android-emulator-runner`, +need to declare `uses: gradle/gradle-build-actionv2` without any arguments before `uses: reactivecircus/android-emulator-runner@v2`, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229). + ## Configurations | **Input** | **Required** | **Default** | **Description** | From 55cd4cd9f0b22d541448d0fad32fc68ac7c91145 Mon Sep 17 00:00:00 2001 From: Goooler Date: Tue, 1 Mar 2022 23:58:26 +0800 Subject: [PATCH 2/3] Code highlighting in README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4fa4e3e1d..559428636 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ It is recommended to run this action on a **macOS** VM, e.g. `macos-latest`, `ma A workflow that uses **android-emulator-runner** to run your instrumented tests on **API 29**: -``` +```yml jobs: test: runs-on: macos-latest @@ -43,7 +43,7 @@ jobs: We can also leverage GitHub Actions's build matrix to test across multiple configurations: -``` +```yml jobs: test: runs-on: macos-latest @@ -67,7 +67,7 @@ jobs: If you need specific versions of **NDK** and **CMake** installed: -``` +```yml jobs: test: runs-on: macos-latest @@ -90,7 +90,7 @@ We can significantly reduce emulator startup time by setting up AVD snapshot cac 2. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot` 3. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save` -``` +```yml jobs: test: runs-on: macos-latest From d8dbc14d9ca0ac3a83e2fcb111d1464395b1cbad Mon Sep 17 00:00:00 2001 From: Goooler Date: Fri, 4 Mar 2022 13:26:19 +0800 Subject: [PATCH 3/3] Add a step in the snippet --- README.md | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 559428636..008350d70 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,10 @@ jobs: We can significantly reduce emulator startup time by setting up AVD snapshot caching: -1. add an `actions/cache@v2` step for caching the `avd` -2. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot` -3. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save` +1. add a `gradle/gradle-build-action@v2` step for caching the Gradle, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229) +2. add an `actions/cache@v2` step for caching the `avd` +3. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot` +4. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save` ```yml jobs: @@ -102,13 +103,8 @@ jobs: uses: actions/checkout@v2 - name: Gradle cache - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} - + uses: gradle/gradle-build-action@v2 + - name: AVD cache uses: actions/cache@v2 id: avd-cache @@ -138,9 +134,6 @@ jobs: script: ./gradlew connectedCheck ``` -Note: if you want to use [gradle-build-action](https://github.com/gradle/gradle-build-action) with `reactivecircus/android-emulator-runner`, -need to declare `uses: gradle/gradle-build-actionv2` without any arguments before `uses: reactivecircus/android-emulator-runner@v2`, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229). - ## Configurations | **Input** | **Required** | **Default** | **Description** |