-
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.
- Loading branch information
Damjan Smickovski
authored and
Damjan Smickovski
committed
Jun 27, 2023
1 parent
b4d363c
commit cd2f81d
Showing
2 changed files
with
27 additions
and
23 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,47 +1,50 @@ | ||
name: CI | ||
name: Appium Tests | ||
|
||
on: [push] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
connected-tests: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
node-version: '14' | ||
|
||
- name: Install yarn | ||
run: npm install -g yarn | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Set up JDK 17 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: 'adopt' | ||
java-version: '17' | ||
cache: 'gradle' | ||
|
||
- name: Set up Android SDK | ||
uses: android-actions/setup-android@v2 | ||
- name: Run connected tests | ||
uses: ReactiveCircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 30 | ||
target: google_apis | ||
arch: x86_64 | ||
script: ./gradlew connectedCheck | ||
|
||
- name: Create and start emulator | ||
run: | | ||
echo "y" | sdkmanager "system-images;android-30;google_apis;x86" | ||
echo "no" | avdmanager create avd --force --name Pixel_3a_API_30_x86 --package "system-images;android-30;google_apis;x86" --device "pixel_3a" | ||
$ANDROID_HOME/emulator/emulator -avd Pixel_3a_API_30_x86 -no-snapshot -no-window -no-audio -gpu swiftshader_indirect & | ||
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82' | ||
- name: Install Appium | ||
run: npm install -g appium | ||
|
||
- name: Install and start Appium | ||
run: | | ||
yarn global add appium@next | ||
appium & | ||
- name: Run Appium | ||
run: appium & | ||
|
||
- name: Run tests | ||
env: | ||
LOG_LEVEL: debug | ||
APPIUM_PORT: 4723 | ||
APPIUM_HOST: localhost | ||
run: yarn test | ||
LOG_LEVEL: info | ||
run: yarn test |
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,3 +1,4 @@ | ||
node_modules | ||
mochawesome-report | ||
.env | ||
.env | ||
.DS_Store |