Skip to content

Add JVM Support

Add JVM Support #160

Workflow file for this run

name: Pull Request
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cocoapods cache
uses: actions/cache@v3
id: cocoapods-cache
with:
path: |
~/.cocoapods
~/Library/Caches/CocoaPods
*/build/cocoapods
*/build/classes
key: cocoapods-cache
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
cache: gradle
- name: Gradle cache
uses: gradle/gradle-build-action@v2
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Kotlin linter
run: ./gradlew ktlintCheck
# TODO: Android instrumented tests don't work
# - name: Run Android instrumented tests
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 29
# target: google_apis
# arch: x86_64
# profile: Nexus 6
# script: ./gradlew webrtc-kmp:connectedAndroidTest
#
# - name: Upload Android test artifact
# uses: actions/upload-artifact@v2
# if: failure()
# with:
# name: "Android Instrumented Tests Report HTML"
# path: "webrtc-kmp/build/reports/androidTests/connected"
- name: Run iOS tests
run: ./gradlew cleanTest webrtc-kmp:iosX64Test
- name: Upload iOS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "iOS Tests Report HTML"
path: "webrtc-kmp/build/reports/tests/iosX64Test"
- name: Run JS tests
run: ./gradlew cleanTest kotlinUpgradeYarnLock webrtc-kmp:jsTest
- name: Upload JS test artifact
uses: actions/upload-artifact@v2
if: failure()
with:
name: "JS Tests Report HTML"
path: "webrtc-kmp/build/reports/tests/jsTest"