chore(deps): update gradle/actions action to v6 (#134) #92
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '.idea/**' | |
| - 'jitpack.yml' | |
| - '**/.gitignore' | |
| - '**/*.md' | |
| pull_request: | |
| paths-ignore: | |
| - '.idea/**' | |
| - 'jitpack.yml' | |
| - '**/.gitignore' | |
| - '**/*.md' | |
| workflow_dispatch: | |
| env: | |
| JAVA_VERSION: 17 | |
| JAVA_DISTRO: 'temurin' | |
| concurrency: | |
| group: ${{ github.ref }}-test | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
| jobs: | |
| Test-Desktop: | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, macos-latest, windows-latest ] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v6 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: ${{ env.JAVA_DISTRO }} | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Run Generic Datastore tests | |
| run: | | |
| ./gradlew :generic-datastore:jvmTest --parallel | |
| - name: Run Generic Datastore Compose tests | |
| if: ${{ !cancelled() }} | |
| run: | | |
| ./gradlew :generic-datastore-compose:jvmTest --parallel | |
| Test-iOS: | |
| timeout-minutes: 15 | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@v6 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: ${{ env.JAVA_VERSION }} | |
| distribution: ${{ env.JAVA_DISTRO }} | |
| - name: Set up gradle | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: Cache Kotlin/Native | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.konan | |
| key: konan-test-ios-${{ hashFiles('gradle/libs.versions.toml') }} | |
| restore-keys: | | |
| konan-test-ios | |
| - name: Run Generic Datastore tests | |
| run: | | |
| ./gradlew :generic-datastore:iosSimulatorArm64Test --parallel | |
| - name: Run Generic Datastore Compose tests | |
| if: ${{ !cancelled() }} | |
| run: | | |
| ./gradlew :generic-datastore-compose:iosSimulatorArm64Test --parallel | |
| Test-Android: | |
| timeout-minutes: 15 | |
| runs-on: ubuntu-latest | |
| env: | |
| api-level: 35 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - 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: Gradle cache | |
| uses: gradle/actions/setup-gradle@v6 | |
| - name: AVD cache | |
| uses: actions/cache@v5 | |
| id: avd-cache | |
| with: | |
| path: | | |
| ~/.android/avd/* | |
| ~/.android/adb* | |
| key: avd-${{ env.api-level }} | |
| - name: create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.api-level }} | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: false | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: false | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: Run Generic Datastore tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.api-level }} | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: false | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| script: ./gradlew :generic-datastore:connectedAndroidDeviceTest | |
| - name: Run Generic Datastore Compose tests | |
| if: ${{ !cancelled() }} | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ env.api-level }} | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: false | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| script: ./gradlew :generic-datastore-compose:connectedAndroidDeviceTest |