chore(deps): update gradle/gradle-build-action action to v3 #95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run AndroidTest | |
on: | |
issue_comment: | |
types: | |
- created | |
jobs: | |
react: | |
if: ${{ github.repository_owner == 'turtton' && github.actor == 'turtton' }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: React comment | |
uses: xt0rted/slash-command-action@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
command: androidTest | |
reaction: "true" | |
reaction-type: "rocket" | |
android_test: | |
needs: react | |
strategy: | |
matrix: | |
sdk-version: [ 24, 25, 26, 27, 28, 29, 30, 31 ] | |
runs-on: macos-latest | |
steps: | |
- name: Get upstream branch | |
uses: xt0rted/pull-request-comment-branch@v1 | |
id: upstreambranch | |
- name: Notify pending status | |
uses: hkusu/status-create-action@v1 | |
with: | |
sha: ${{ steps.upstreambranch.outputs.sha }} | |
state: pending | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ steps.upstreambranch.outputs.head_ref }} | |
- name: Set up jdk | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Check android test | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.sdk-version }} | |
target: google_apis | |
script: ./gradlew connectedCheck --stacktrace | |
- name: Notify pending status | |
uses: hkusu/status-create-action@v1 | |
with: | |
sha: ${{ steps.upstreambranch.outputs.sha }} | |
state: success | |
- name: Notify pending status | |
uses: hkusu/status-create-action@v1 | |
if: failure() | |
with: | |
sha: ${{ steps.upstreambranch.outputs.sha }} | |
state: failure | |
- name: Save logcat output | |
uses: actions/upload-artifact@master | |
if: failure() | |
with: | |
name: logcat | |
path: artifacts/logcat.log | |
# result: | |
# runs-on: ubuntu-latest | |
# needs: android_test | |
# if: always() | |
# steps: | |
# - name: Send result message | |
# uses: actions/github-script@v6 | |
# env: | |
# MESSAGE: Finish AndroidTest Action. See [log](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# script: | | |
# github.rest.issues.createComment({ | |
# issue_number: context.issue.number, | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# body: process.env.MESSAGE | |
# }) |