Skip to content

Commit 20da7ea

Browse files
authored
Update README for using with gradle/gradle-build-action (#230)
* Update README for using with gradle/gradle-build-action * Code highlighting in README * Add a step in the snippet
1 parent 08a23a6 commit 20da7ea

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

README.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ It is recommended to run this action on a **macOS** VM, e.g. `macos-latest`, `ma
2626

2727
A workflow that uses **android-emulator-runner** to run your instrumented tests on **API 29**:
2828

29-
```
29+
```yml
3030
jobs:
3131
test:
3232
runs-on: macos-latest
@@ -43,7 +43,7 @@ jobs:
4343
4444
We can also leverage GitHub Actions's build matrix to test across multiple configurations:
4545
46-
```
46+
```yml
4747
jobs:
4848
test:
4949
runs-on: macos-latest
@@ -67,7 +67,7 @@ jobs:
6767
6868
If you need specific versions of **NDK** and **CMake** installed:
6969
70-
```
70+
```yml
7171
jobs:
7272
test:
7373
runs-on: macos-latest
@@ -86,11 +86,12 @@ jobs:
8686
8787
We can significantly reduce emulator startup time by setting up AVD snapshot caching:
8888
89-
1. add an `actions/cache@v2` step for caching the `avd`
90-
2. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot`
91-
3. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save`
89+
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)
90+
2. add an `actions/cache@v2` step for caching the `avd`
91+
3. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot`
92+
4. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save`
9293

93-
```
94+
```yml
9495
jobs:
9596
test:
9697
runs-on: macos-latest
@@ -102,13 +103,8 @@ jobs:
102103
uses: actions/checkout@v2
103104
104105
- name: Gradle cache
105-
uses: actions/cache@v2
106-
with:
107-
path: |
108-
~/.gradle/caches
109-
~/.gradle/wrapper
110-
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
111-
106+
uses: gradle/gradle-build-action@v2
107+
112108
- name: AVD cache
113109
uses: actions/cache@v2
114110
id: avd-cache

0 commit comments

Comments
 (0)