diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bd9390..82771f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,16 +27,11 @@ jobs: go-version-file: go.mod cache: true - - name: Set up the JDKs + - name: Set up JDK 17 uses: actions/setup-java@v4 with: distribution: temurin - # The sidecar toolchain pins 17; the metro gradle plugin folio - # compiles with needs a 21 runtime. Both are installed so each - # gradle build can pick its own. - java-version: | - 17 - 21 + java-version: "17" - name: Set up Android SDK uses: android-actions/setup-android@v3 @@ -100,9 +95,16 @@ jobs: - name: Run tests run: make test - # folio's own gradle build, which `make test` does not reach. Its own - # step rather than part of `test` so the target developers run - # constantly keeps its 17 floor. + # folio is its own gradle build, and the metro plugin it compiles with + # needs a 21 runtime where the sidecar toolchain pins 17. Switching + # JAVA_HOME after `make test` rather than installing both up front + # leaves every step above this one on exactly the JDK it ran on before. + - name: Set up JDK 21 for folio + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + - name: Run folio's unit tests run: make test-folio