57 lines
1.8 KiB
YAML
57 lines
1.8 KiB
YAML
name: android-device-test
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: [android-ci]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
create-check:
|
|
strategy:
|
|
matrix:
|
|
test: [
|
|
{artifactName: android-render-tests, testFile: RenderTests.apk, appFile: RenderTestsApp.apk, name: "Android Render Tests"},
|
|
]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: ./.github/actions/download-workflow-run-artifact
|
|
with:
|
|
artifact-name: ${{ matrix.test.artifactName }}
|
|
expect-files: "${{ matrix.test.testFile }}, ${{ matrix.test.appFile }}"
|
|
|
|
- name: Generate token
|
|
id: generate_token
|
|
uses: tibdex/github-app-token@v1
|
|
with:
|
|
app_id: ${{ secrets.MAPLIBRE_NATIVE_BOT_APP_ID }}
|
|
private_key: ${{ secrets.MAPLIBRE_NATIVE_BOT_PRIVATE_KEY }}
|
|
|
|
- uses: LouisBrunner/checks-action@v1.6.2
|
|
id: create_check
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
|
status: queued
|
|
name: ${{ matrix.test.name }}
|
|
sha: ${{ github.event.workflow_run.head_sha }}
|
|
|
|
- uses: ./.github/actions/aws-device-farm-run
|
|
with:
|
|
name: ${{ matrix.test.name }}
|
|
appType: ANDROID_APP
|
|
appFile: ${{ matrix.test.appFile }}
|
|
testFile: ${{ matrix.test.appFile }}
|
|
testPackageType: INSTRUMENTATION_TEST_PACKAGE
|
|
testType: INSTRUMENTATION
|
|
|
|
- uses: LouisBrunner/checks-action@v1.6.2
|
|
if: always()
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
check_id: ${{ steps.create_check.outputs.check_id }}
|
|
conclusion: ${{ job.status }}
|
|
sha: ${{ github.event.workflow_run.sha }}
|