Created
March 31, 2020 16:44
-
-
Save HebertCL/a8d5189edbd60950a3c7feddad8f07e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
*** Settings *** | |
Documentation End-to-end happy path of customer acquisition | |
... for Android | |
Library AppiumLibrary run_on_failure=No Operation | |
*** Variables *** | |
${REMOTE_URL} http://localhost:4723/wd/hub | |
${platformName} Android | |
${deviceName} Android Emulator | |
${app} /Users/hebertcuellar/Documents/app.apk | |
*** Keywords *** | |
Open app | |
Open Application ${REMOTE_URL} platformName=${platformName} deviceName=${deviceName} app=${app} | |
Set Appium Timeout ${timeout} |
This file contains hidden or 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
name: Android Test Cases Suite | |
on: | |
push: | |
branches: | |
- feat/add-github-actions | |
env: | |
GCP_PROJECT: ${{ secrets.GCP_ADMIN_PROJECT }} | |
GCP_CREDENTIALS: ${{ secrets.GCP_ADMIN_CREDENTIALS }} | |
WORKDIR: ${{ github.github_workspace }} | |
BUCKET: gs://tf-mobile-artifacts | |
APK_NAME: app-debug.apk | |
jobs: | |
upload-artifact: | |
name: Download apk from GCS | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download apk | |
uses: actions-hub/gcloud@master | |
env: | |
PROJECT_ID: ${{ secrets.GCP_ADMIN_PROJECT }} | |
APPLICATION_CREDENTIALS: ${{ secrets.GCP_ADMIN_CREDENTIALS }} | |
CLI: gsutil | |
with: | |
args: cp $BUCKET/$APK_NAME . | |
- name: Upload apk | |
uses: actions/upload-artifact@v1 | |
with: | |
name: app.apk | |
path: . | |
android-suite: | |
needs: upload-artifact | |
name: Android Test Suite with Appium | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Appium | |
run: | | |
npm install -g appium --unsafe-perm=true --allow-root | |
npm install -g appium-doctor | |
- name: Check for dependencies and start Appium | |
run: | | |
appium-doctor | |
appium & | |
- name: Install Robot framework | |
run: | | |
pip3 install --upgrade robotframework | |
pip3 install --upgrade robotframework-appiumlibrary | |
- name: Download apk | |
uses: actions/download-artifact@v1 | |
with: | |
name: app.apk | |
- name: Verify Download | |
run: | | |
ls -la $WORKDIR | |
- name: Test on emulator | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 25 | |
target: google_apis | |
arch: x86_64 | |
profile: pixel | |
script: robot --variable app:./app.apk android_happypath_1pago.robot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment