Update maven.yml #15
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Android Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
device: [ | |
"Samsung Galaxy A11", | |
"Samsung Galaxy A51", | |
"Motorola Moto G71 5G", | |
"Google Pixel 7 Pro", | |
"Xiaomi Redmi Note 11", | |
"Huawei P30", | |
"Oppo Reno 6" | |
] | |
android_version: [ | |
"10", # Samsung Galaxy A11 | |
"10", # Samsung Galaxy A51 | |
"11", # Motorola Moto G71 5G | |
"13", # Google Pixel 7 Pro | |
"11", # Xiaomi Redmi Note 11 | |
"9", # Huawei P30 | |
"11" # Oppo Reno 6 | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Run tests on BrowserStack | |
env: | |
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }} | |
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }} | |
DEVICE_NAME: ${{ matrix.device }} | |
ANDROID_VERSION: ${{ matrix.android_version }} | |
run: | | |
mvn clean test -DDEVICE_NAME="${{ matrix.device }}" -DANDROID_VERSION="${{ matrix.android_version }}" -DBROWSERSTACK_USER=${{ secrets.BROWSERSTACK_USER }} -DBROWSERSTACK_KEY=${{ secrets.BROWSERSTACK_KEY }} |