Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browserstack #47

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Android AppCenter Tests
name: Android BrowserStack Tests

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/android-appcenter.yml'
- '.github/workflows/android-browserstack.yml'
- 'binding/android/OrcaTestApp/**'
- 'resources/.test/**'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/android-appcenter.yml'
- '.github/workflows/android-browserstack.yml'
- 'binding/android/OrcaTestApp/**'
- 'resources/.test/**'

Expand All @@ -21,24 +21,23 @@ defaults:

jobs:
build:
name: Run Android Tests on AppCenter
name: Run Android Tests on BrowserStack
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*
python-version: '3.10'
- run:
pip3 install requests

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -66,35 +65,34 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleAndroidTest

- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Orca-Android"
--devices "Picovoice/android-min-max"
--app-path orca-test-app/build/outputs/apk/debug/orca-test-app-debug.apk
--test-series "orca-android"
--locale "en_US"
--build-dir orca-test-app/build/outputs/apk/androidTest/debug
- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type espresso
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Orca-Android"
--devices "android-min-max"
--app_path "orca-test-app/build/outputs/apk/debug/orca-test-app-debug.apk"
--test_path "orca-test-app/build/outputs/apk/androidTest/debug/orca-test-app-debug-androidTest.apk"

build-integ:
name: Run Android Integration Tests on AppCenter
name: Run Android Integration Tests on BrowserStack
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*

- name: Install AppCenter CLI
run: npm install -g appcenter-cli
python-version: '3.10'
- run:
pip3 install requests

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -122,12 +120,12 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleReleaseAndroidTest -DtestBuildType=integ

- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Orca-Android"
--devices "Picovoice/android-min-max"
--app-path orca-test-app/build/outputs/apk/release/orca-test-app-release.apk
--test-series "orca-android"
--locale "en_US"
--build-dir orca-test-app/build/outputs/apk/androidTest/release
- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type espresso
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Orca-Android-Integration"
--devices "android-min-max"
--app_path "orca-test-app/build/outputs/apk/release/orca-test-app-release.apk"
--test_path "orca-test-app/build/outputs/apk/androidTest/release/orca-test-app-release-androidTest.apk"
4 changes: 2 additions & 2 deletions .github/workflows/android-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Build
Expand Down
41 changes: 19 additions & 22 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,30 @@ defaults:

jobs:
build:
name: Run Android Speed Tests on AppCenter
name: Run Android Speed Tests on BrowserStack
runs-on: ubuntu-latest

strategy:
matrix:
device: [ single-android, 32bit-android ]
device: [ android-perf ]
include:
- device: single-android
- device: android-perf
procPerformanceThresholdSec: 3.0
- device: 32bit-android
procPerformanceThresholdSec: 19.0

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*
python-version: '3.10'
- run:
pip3 install requests

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: set up JDK 11
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- name: Copy test_resources
Expand Down Expand Up @@ -84,12 +81,12 @@ jobs:
- name: Build androidTest
run: ./gradlew assembleAndroidTest -DtestBuildType=perf

- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Orca-Android"
--devices "Picovoice/${{ matrix.device }}"
--app-path orca-test-app/build/outputs/apk/debug/orca-test-app-debug.apk
--test-series "orca-android"
--locale "en_US"
--build-dir orca-test-app/build/outputs/apk/androidTest/debug
- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type espresso
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Orca-Android-Performance"
--devices "${{ matrix.device }}"
--app_path "orca-test-app/build/outputs/apk/debug/orca-test-app-debug.apk"
--test_path "orca-test-app/build/outputs/apk/androidTest/debug/orca-test-app-debug-androidTest.apk"
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: iOS AppCenter Tests
name: iOS BrowserStack Tests

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/ios-appcenter.yml'
- '.github/workflows/ios-browserstack.yml'
- 'binding/ios/OrcaAppTest/**'
- 'resources/.test/**'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/ios-appcenter.yml'
- '.github/workflows/ios-browserstack.yml'
- 'binding/ios/OrcaAppTest/**'
- 'resources/.test/**'

Expand All @@ -21,24 +21,23 @@ defaults:

jobs:
build:
name: Run iOS Tests on AppCenter
name: Run iOS Tests on BrowserStack
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
- name: Installing Python
uses: actions/setup-python@v5
with:
node-version: lts/*
python-version: '3.10'
- run:
pip3 install requests

- name: Install Cocoapods
run: gem install cocoapods

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: Make build dir
run: mkdir ddp

Expand All @@ -53,7 +52,7 @@ jobs:
- name: Run Cocoapods
run: pod install

- name: Inject AppID
- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
OrcaAppTestUITests/BaseTest.swift

Expand All @@ -66,11 +65,23 @@ jobs:
-derivedDataPath ddp
CODE_SIGNING_ALLOWED=NO

- name: Run Tests on AppCenter
run: appcenter test run xcuitest
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Orca-iOS"
--devices "Picovoice/ios-min-max"
--test-series "orca-ios"
--locale "en_US"
--build-dir ddp/Build/Products/Debug-iphoneos
- name: Generating ipa
run: cd ddp/Build/Products/Debug-iphoneos/ &&
mkdir Payload &&
cp -r OrcaAppTest.app Payload &&
zip --symlinks -r OrcaAppTest.ipa Payload &&
rm -r Payload

- name: Zipping Tests
run: cd ddp/Build/Products/Debug-iphoneos/ &&
zip --symlinks -r OrcaAppTestUITests.zip OrcaAppTestUITests-Runner.app

- name: Run tests on BrowserStack
run: python3 ../../../script/automation/browserstack.py
--type xcuitest
--username "${{secrets.BROWSERSTACK_USERNAME}}"
--access_key "${{secrets.BROWSERSTACK_ACCESS_KEY}}"
--project_name "Orca-iOS"
--devices "ios-min-max"
--app_path "ddp/Build/Products/Debug-iphoneos/OrcaAppTest.ipa"
--test_path "ddp/Build/Products/Debug-iphoneos/OrcaAppTestUITests.zip"
3 changes: 0 additions & 3 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ jobs:
- name: Install Cocoapods
run: gem install cocoapods

- name: Install AppCenter CLI
run: npm install -g appcenter-cli

- name: Make build dir
run: mkdir ddp

Expand Down
Loading
Loading