Android Render Test CI (#1387)
This commit is contained in:
17
.github/workflows/android-ci.yml
vendored
17
.github/workflows/android-ci.yml
vendored
@@ -192,6 +192,23 @@ jobs:
|
||||
name: uploadsEnv
|
||||
path: uploads.env
|
||||
|
||||
|
||||
# render test
|
||||
- name: Build Render Test App
|
||||
run: |
|
||||
./gradlew assembleDebug assembleAndroidTest
|
||||
cp app/build/outputs/apk/debug/app-debug.apk RenderTestsApp.apk
|
||||
cp app/build/outputs/apk/debug/app-debug.apk RenderTests.apk
|
||||
working-directory: ./render-test/android
|
||||
|
||||
- name: Store Render Test .apk files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: android-render-tests
|
||||
path: |
|
||||
./render-test/android/RenderTestsApp.apk
|
||||
./render-test/android/RenderTests.apk
|
||||
|
||||
- name: Store debug artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
||||
56
.github/workflows/android-device-test.yml
vendored
Normal file
56
.github/workflows/android-device-test.yml
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
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 }}
|
||||
Reference in New Issue
Block a user