Skip to content

android-device-test #1055

android-device-test

android-device-test #1055

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@v4
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.MAPLIBRE_NATIVE_BOT_APP_ID }}
private_key: ${{ secrets.MAPLIBRE_NATIVE_BOT_PRIVATE_KEY }}
- uses: LouisBrunner/[email protected]
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/download-workflow-run-artifact
with:
artifact-name: ${{ matrix.test.artifactName }}
- name: Check if test files exist (otherwise the parent workflow was skipped)
id: check_files
uses: andstor/[email protected]
with:
files: "${{ matrix.test.testFile }}, ${{ matrix.test.appFile }}"
- uses: ./.github/actions/aws-device-farm-run
if: steps.check_files.outputs.files_exists == 'true'
with:
name: ${{ matrix.test.name }}
appType: ANDROID_APP
appFile: ${{ matrix.test.appFile }}
testFile: ${{ matrix.test.testFile }}
testPackageType: INSTRUMENTATION_TEST_PACKAGE
testType: INSTRUMENTATION
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ROLE_TO_ASSUME: ${{ vars.AWS_ROLE_TO_ASSUME }}
AWS_DEVICE_FARM_PROJECT_ARN: ${{ vars.AWS_DEVICE_FARM_PROJECT_ARN }}
AWS_DEVICE_FARM_DEVICE_POOL_ARN: ${{ vars.AWS_DEVICE_FARM_DEVICE_POOL_ARN }}
- uses: LouisBrunner/[email protected]
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 }}