Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit df29ad7

Browse files
committed
chore(workflow): add job to run Android connected checks
1 parent c30dabe commit df29ad7

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,59 @@ jobs:
173173
name: test-results-tooling-api-tests
174174
path: '**/build/reports/tests/'
175175

176+
run_connected_checks:
177+
name: Run connected checks
178+
runs-on: macos-latest
179+
strategy:
180+
matrix:
181+
api-level: [ 26, 29, 32 ]
182+
target: [ default ]
183+
steps:
184+
- name: Cancel previous runs
185+
uses: styfle/[email protected]
186+
with:
187+
access_token: ${{ github.token }}
188+
- name: Checkout
189+
uses: actions/checkout@v4
190+
with:
191+
fetch-depth: 0
192+
- name: Set up JDK 17
193+
uses: actions/setup-java@v4
194+
with:
195+
java-version: ${{ env.BUILD_JAVA_VERSION }}
196+
distribution: ${{ env.BUILD_JAVA_DIST }}
197+
- name: Change Gradle wrapper permissions
198+
run: chmod +x ./gradlew
199+
- name: Restore cache
200+
uses: actions/cache@v3
201+
with:
202+
path: |
203+
~/.gradle/caches
204+
~/.gradle/wrapper
205+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
206+
restore-keys: |
207+
${{ runner.os }}-gradle-
208+
- name: Run connected checks
209+
uses: reactivecircus/android-emulator-runner@v2
210+
with:
211+
api-level: ${{ matrix.api-level }}
212+
target: ${{ matrix.target }}
213+
arch: x86_64
214+
profile: Nexus 6
215+
script: ./gradlew connectedCheck
216+
176217
publish:
177218
name: Publish release
178219
runs-on: ubuntu-latest
179220
needs: [ build_apk, run_unit_tests, run_tooling_api_tests ]
180-
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name != 'pull_request' && needs.build_apk.result == 'success' && needs.run_unit_tests.result == 'success' && needs.run_tooling_api_tests.result == 'success' }}
221+
if: |
222+
always()
223+
&& github.ref == 'refs/heads/main'
224+
&& github.event_name != 'pull_request'
225+
&& needs.build_apk.result == 'success'
226+
&& needs.run_unit_tests.result == 'success'
227+
&& needs.run_tooling_api_tests.result == 'success'
228+
&& needs.run_connected_checks.result == 'success'
181229
steps:
182230
- name: Checkout
183231
uses: actions/checkout@v4

0 commit comments

Comments
 (0)