Bump Gradle Wrapper from 8.10.2 to 8.11 (#193) #401
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
name: 'Test Lib' | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
unitTest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/jdks | |
key: gradle-caches-unit-test-v0-${{ hashFiles('gradle/libs.versions.toml', '**/build.gradle.kts', 'build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Run unit tests | |
run: ./gradlew :core:testDebugUnitTest | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
check_name: Unit Test Report | |
report_paths: 'core/build/test-results/testDebugUnitTest/TEST-*.xml' | |
assembleLibrary: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/jdks | |
key: gradle-caches-unit-test-v0-${{ hashFiles('gradle/libs.versions.toml', '**/build.gradle.kts', 'build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Assemble library | |
run: ./gradlew assembleDebug | |
instrumentationTest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: Cache Gradle | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
~/.gradle/jdks | |
key: gradle-caches-instrumentation-test-v0-${{ hashFiles('gradle/libs.versions.toml', '**/build.gradle.kts', 'build.gradle.kts', 'settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Enable KVM | |
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: Run instrumentation tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
emulator-boot-timeout: 12000 | |
script: ./gradlew :core:connectedAndroidTest | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v4 | |
if: success() || failure() | |
with: | |
check_name: Instrumentation Test Report | |
report_paths: 'core/build/outputs/androidTest-results/connected/flavors/debugAndroidTest/TEST-*.xml' |