From 9d5d6236f44d786bfff168e4c7a2d1a2d16f0c6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3bert=20Papp?= Date: Sat, 27 Jan 2024 12:11:47 +0000 Subject: [PATCH] Migrate to Node 20 on CI via GitHub Actions major upgrades (#372) * Update first party actions to Node 20 majors. * Update Gradle cache actions to Node 20 majors. --- .github/workflows/action-types.yml | 2 +- .github/workflows/main.yml | 14 +++++++------- .github/workflows/manually.yml | 6 +++--- README.md | 16 ++++++++-------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/action-types.yml b/.github/workflows/action-types.yml index 90f969154..ad67c62dd 100644 --- a/.github/workflows/action-types.yml +++ b/.github/workflows/action-types.yml @@ -9,5 +9,5 @@ jobs: validate-typings: runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: krzema12/github-actions-typing@v0 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 43170a6b6..30e85bcf3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: validate gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -61,12 +61,12 @@ jobs: npm run lint npm test - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 21 - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: avd-cache with: path: | @@ -75,11 +75,11 @@ jobs: ~/.android/debug.keystore key: avd-${{ matrix.api-level }}-${{ matrix.os }}-${{ matrix.target }} + - uses: gradle/actions/setup-gradle@v3 + - name: assemble tests - uses: gradle/gradle-build-action@v2 - with: - build-root-directory: test-fixture - arguments: assembleAndroidTest + working-directory: test-fixture + run: ./gradlew assembleAndroidTest - name: enable KVM for linux runners if: runner.os == 'Linux' diff --git a/.github/workflows/manually.yml b/.github/workflows/manually.yml index 753b86a59..6b2e51102 100644 --- a/.github/workflows/manually.yml +++ b/.github/workflows/manually.yml @@ -39,7 +39,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: validate gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -51,12 +51,12 @@ jobs: npm run lint npm test - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: 21 - - uses: gradle/gradle-build-action@v2 + - uses: gradle/actions/setup-gradle@v3 with: gradle-home-cache-cleanup: true diff --git a/README.md b/README.md index d1b1871f5..15a44b9a5 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Enable KVM run: | @@ -76,7 +76,7 @@ jobs: target: [default, google_apis] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Enable KVM run: | @@ -102,7 +102,7 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Enable KVM run: | @@ -121,8 +121,8 @@ jobs: We can significantly reduce emulator startup time by setting up AVD snapshot caching: -1. add a `gradle/gradle-build-action@v2` step for caching Gradle, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229) -2. add an `actions/cache@v3` step for caching the `avd` +1. add a `gradle/actions/setup-gradle@v3` step for caching Gradle, more details see [#229](https://github.com/ReactiveCircus/android-emulator-runner/issues/229) +2. add an `actions/cache@v4` step for caching the `avd` 3. add a `reactivecircus/android-emulator-runner@v2` step to generate a clean snapshot - specify `emulator-options` without `no-snapshot` 4. add another `reactivecircus/android-emulator-runner@v2` step to run your tests using existing AVD / snapshot - specify `emulator-options` with `no-snapshot-save` @@ -135,7 +135,7 @@ jobs: api-level: [21, 23, 29] steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Enable KVM run: | @@ -144,10 +144,10 @@ jobs: sudo udevadm trigger --name-match=kvm - name: Gradle cache - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 - name: AVD cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: avd-cache with: path: |