Skip to content

Commit

Permalink
Merge pull request #4 from Mahbub091/Mahbub091-patch-1
Browse files Browse the repository at this point in the history
updated file
  • Loading branch information
Mahbub091 authored Aug 15, 2023
2 parents 5058ebe + a3e82d7 commit d122330
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 33 deletions.
78 changes: 51 additions & 27 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,60 @@
name: Appium CI
name: Run Android Test on Appium

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

workflow_dispatch:

jobs:
ui-tests:
test:
runs-on: macos-latest
strategy:
matrix:
api-level: [28]
target: [default]
runs-on: macos-latest
api-level: [29]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3.6.0
with:
distribution: 'temurin'
java-version: 11
cache: 'maven'
- name: Install the Emulator
run: |
chmod +x ./scripts/RunAppiumServer.sh
./scripts/RunAppiumServer.sh
shell: bash
- name: Run Appium Tests
uses: reactivecircus/android-emulator-runner@v2.27.0
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
script: ./gradlew test
- name: checkout
uses: actions/checkout@v2

- name: Set up JDK 1.11
uses: actions/setup-java@v1
with:
java-version: 11

- uses: actions/setup-node@v2
with:
node-version: "16"
- run: |
npm install -g appium@latest
appium -v
appium &>/dev/null &
# - name: AVD cache
# uses: actions/cache@v2
# id: avd-cache
# with:
# path: |
# ~/.android/avd/*
# ~/.android/adb*
# key: avd-${{ matrix.api-level }}

# - name: create AVD and generate snapshot for caching
# if: steps.avd-cache.outputs.cache-hit != 'true'
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: ${{ matrix.api-level }}
# force-avd-creation: false
# emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
# disable-animations: false
# script: echo "Generated AVD snapshot for caching."

- name: run android tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: mvn clean test -Pandroid
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@
<version>${log4japi.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
</dependencies>

<build>
Expand Down

0 comments on commit d122330

Please sign in to comment.