Added jvm test #809
This file contains 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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Pull Request | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
jobEmulatorMatrixSetup: | |
runs-on: ubuntu-latest | |
outputs: | |
emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: gradle | |
- name: Prepare the matrix JSON | |
run: ./gradlew ciEmulatorJobsMatrixSetup | |
- id: dataStep | |
run: echo "emulator_jobs_matrix=$(jq -c . < ./build/emulator_jobs_matrix.json)" >> $GITHUB_OUTPUT | |
build-android: | |
needs: jobEmulatorMatrixSetup | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.jobEmulatorMatrixSetup.outputs.emulator_jobs_matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 | |
- name: Setup test environment | |
uses: ./.github/actions/setup_test_action | |
- name: Apply Android licenses | |
run: ./gradlew ciSdkManagerLicenses | |
- name: Run Android Instrumented Tests | |
run: ./gradlew ${{ matrix.gradle_tasks }} | |
- name: Upload Android test artifact | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "Android Test Report HTML" | |
path: "**/build/reports/androidTests/" | |
- name: Upload Firebase Debug Log | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "Firebase Debug Log" | |
path: "**/firebase-debug.log" | |
build-js: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup test environment | |
uses: ./.github/actions/setup_test_action | |
timeout-minutes: 10 | |
- name: Run JS Tests | |
run: ./gradlew cleanTest jsTest | |
- name: Upload JS test artifact | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "JS Test Report HTML" | |
path: | | |
**/build/reports/tests/jsTest/ | |
**/build/reports/tests/jsBrowserTest/ | |
**/build/reports/tests/jsNodeTest/ | |
- name: Upload Firebase Debug Log | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "Firebase Debug Log" | |
path: "**/firebase-debug.log" | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cocoapods cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cocoapods | |
~/Library/Caches/CocoaPods | |
*/build/cocoapods | |
*/build/classes | |
key: cocoapods-cache-v2 | |
- name: Setup test environment | |
uses: ./.github/actions/setup_test_action | |
- name: Run iOS Tests | |
run: ./gradlew cleanTest iosX64Test | |
- name: Upload iOS test artifact | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "iOS Test Report HTML" | |
path: "**/build/reports/tests/iosX64Test/" | |
- name: Upload Firebase Debug Log | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "Firebase Debug Log" | |
path: "**/firebase-debug.log" | |
build-jvm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup test environment | |
uses: ./.github/actions/setup_test_action | |
timeout-minutes: 10 | |
- name: Run JVM Tests | |
run: ./gradlew cleanTest jvmTest | |
- name: Upload JVM test artifact | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "JVM Test Report HTML" | |
path: | | |
**/build/reports/tests/jvmTest/ | |
- name: Upload Firebase Debug Log | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: "Firebase Debug Log" | |
path: "**/firebase-debug.log" |