-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from Mahbub091/Mahbub091-patch-1
updated file
- Loading branch information
Showing
2 changed files
with
51 additions
and
33 deletions.
There are no files selected for viewing
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
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 |
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