Skip to content

Android cleanup and tests, CI updates #8

Android cleanup and tests, CI updates

Android cleanup and tests, CI updates #8

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '*'
jobs:
test-ios:
name: "iOS Tests"
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Set up example app
run: |
npm i
npx cordova prepare ios
working-directory: ./example
- name: Run iOS Unit Tests
run: |
xcodebuild test -quiet \
-project OAuthPluginTests.xcodeproj \
-scheme OAuthPluginTests \
-testPlan UnitTests \
-destination "platform=iOS Simulator,name=iPhone 15"
working-directory: ./tests/ios
- name: Run iOS UI Tests
run: |
xcodebuild test \
-project OAuthPluginTests.xcodeproj \
-scheme OAuthPluginTests \
-testPlan DeviceTests \
-destination "platform=iOS Simulator,name=iPhone 15" \
-destination-timeout 300
working-directory: ./tests/ios
test-android:
name: "Android Tests"
runs-on: ubuntu-latest
steps:
- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Use Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Set up example app
run: |
npm i
npx cordova prepare android
working-directory: ./example
- name: Set up gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.4
- name: Run Android Unit Tests
run: |
gradle test
working-directory: ./tests/android
- name: Run Android UI Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: gradle connectedCheck
working-directory: ./tests/android