WIP: Capacitor 7 Upgrade #58
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 UI Tests | |
on: | |
pull_request: | |
paths: | |
- './github/workflows/ui-tests.yml' | |
- 'IonicPortals/**' | |
- 'TestApp/**' | |
- 'TestAppCompose/**' | |
jobs: | |
test: | |
# These permissions are needed to interact with GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: macos-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: create local.properties file for app creds | |
env: | |
PORTALS_KEY: ${{ secrets.portals_key }} | |
run: echo portals_key=\"$PORTALS_KEY\" > ./local.properties | |
- name: set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Grant execute permission for gradlew | |
run: chmod +x ./gradlew | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run build for testing | |
run: ./gradlew assembleDebug assembleAndroidTest | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
- name: Schedule test | |
uses: realm/aws-devicefarm/test-application@master | |
with: | |
name: test-application | |
project_arn: ${{ secrets.AWS_PROJECT_ARN }} | |
device_pool_arn: ${{ secrets.AWS_DEVICE_POOL_ARN }} | |
app_file: ./TestApp/build/outputs/apk/debug/TestApp-debug.apk | |
app_type: ANDROID_APP | |
test_type: INSTRUMENTATION | |
test_package_file: ./TestApp/build/outputs/apk/androidTest/debug/TestApp-debug-androidTest.apk | |
test_package_type: INSTRUMENTATION_TEST_PACKAGE |