Skip to content

build: Added run matrix #17

build: Added run matrix

build: Added run matrix #17

Workflow file for this run

name: Appium Tests
on:
push:
pull_request:
jobs:
test:
runs-on: macos-latest
strategy:
matrix:
api-level: [21, 28, 29, 33]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- uses: actions/cache@v3
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: ./tests
run: |
npm install -g appium
appium driver install uiautomator2
npm install
- name: Start Appium server
run: appium --allow-insecure=adb_shell &
- name: Run emulator and tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
script: ./gradlew assembleDebug && cd tests && npm run test
- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v3
with:
path: |
tests/failures
!tests/failures/sources/.gitignore
!tests/failures/screenshots/.gitignore