Skip to content

Commit

Permalink
Testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Damjan Smickovski authored and Damjan Smickovski committed Jun 27, 2023
1 parent b4d363c commit cd2f81d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 23 deletions.
47 changes: 25 additions & 22 deletions .github/workflows/run-tests.yml
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
mochawesome-report
.env
.env
.DS_Store

0 comments on commit cd2f81d

Please sign in to comment.