blob: 49a191fe41071ed8051467e8707c4b6335c357ab [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: Android Testsuite
on: [push, pull_request]
jobs:
test:
name: Android Latest Test
runs-on: macos-latest
# hoist configurations to top that are expected to be updated
env:
node-version: 16
java-version: 11
java-distro: 'adopt'
android-api: 30
# E.g. android-11 from the file: ./pr/local/android-11.config.json
target-test: android-11
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
- uses: actions/setup-java@v2
with:
distribution: ${{ env.java-distro }}
java-version: ${{ env.java-version }}
- name: Run Environment Information
run: |
node --version
npm --version
java -version
- name: Run npm install
run: |
export PATH="/usr/local/lib/android/sdk/platform-tools":$PATH
export JAVA_HOME=$JAVA_HOME_11_X64
npm i -g cordova
npm ci
- uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
with:
api-level: ${{ env.android-api }}
target: google_apis
arch: x86_64
force-avd-creation: false
disable-animations: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
script: echo "Pregenerate the AVD before running Paramedic"
- name: Run paramedic tests
uses: reactivecircus/android-emulator-runner@5de26e4bd23bf523e8a4b7f077df8bfb8e52b50e
with:
api-level: ${{ env.android-api }}
target: google_apis
arch: x86_64
force-avd-creation: false
disable-animations: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
script: node main.js --config ./pr/local/${{ env.target-test }}.config.json --plugin ./spec/testable-plugin/