@@ -11,28 +11,33 @@ jobs:
1111 name : Build and test
1212 runs-on : ubuntu-latest
1313 if : ${{ !github.event.pull_request.draft }}
14+ env :
15+ GRADLE_OPTS : " -Dorg.gradle.jvmargs=-Xmx3g -XX:+UseParallelGC"
1416 steps :
1517 - name : Checkout
16- uses : actions/checkout@v4
18+ uses : actions/checkout@v6
1719 - name : Set up JDK 17
18- uses : actions/setup-java@v4
20+ uses : actions/setup-java@v5
1921 with :
2022 java-version : ' 17'
2123 distribution : ' adopt'
22- - name : Build
23- run : ./gradlew clean build -x test -x ktlintMainSourceSetCheck
24- - name : Test
25- run : ./gradlew test --continue
24+ - name : Setup Gradle
25+ uses : gradle/actions/setup-gradle@v5
26+ with :
27+ # Read cache in PRs, write to cache after merge to main or develop
28+ cache-read-only : ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
29+ - name : Build and Test
30+ run : ./gradlew assembleDebug testDebugUnitTest lintDebug
2631
2732 lint-kt :
2833 name : Lint Kotlin
2934 runs-on : macos-latest
3035 if : ${{ !github.event.pull_request.draft }}
3136 steps :
3237 - name : Checkout
33- uses : actions/checkout@v4
38+ uses : actions/checkout@v6
3439 - name : Set up JDK 17
35- uses : actions/setup-java@v4
40+ uses : actions/setup-java@v5
3641 with :
3742 java-version : ' 17'
3843 distribution : ' adopt'
@@ -47,14 +52,14 @@ jobs:
4752 scripts : ${{ 'readium/navigator/src/main/assets/_scripts' }}
4853 steps :
4954 - name : Checkout
50- uses : actions/checkout@v4
55+ uses : actions/checkout@v6
5156 - name : Install pnpm
5257 uses : pnpm/action-setup@v4
5358 with :
5459 package_json_file : readium/navigator/src/main/assets/_scripts/package.json
5560 run_install : false
5661 - name : Setup cache
57- uses : actions/setup-node@v4
62+ uses : actions/setup-node@v6
5863 with :
5964 node-version : 20
6065 cache : ' pnpm'
6772 run : pnpm --dir "$scripts" run checkformat
6873 - name : Check if bundled scripts are up-to-date
6974 run : |
70- make scripts-legacy
71- git diff --exit-code --name-only src/main/assets/readium/scripts/*.js
75+ make scripts-legacy
76+ git diff --exit-code --name-only src/main/assets/readium/scripts/*.js
7277 lint-new-ts :
7378 name : Lint TypeScript
7479 runs-on : macos-latest
@@ -77,14 +82,14 @@ jobs:
7782 scripts : ${{ 'readium/navigators/web/internals/scripts' }}
7883 steps :
7984 - name : Checkout
80- uses : actions/checkout@v4
85+ uses : actions/checkout@v6
8186 - name : Install pnpm
8287 uses : pnpm/action-setup@v4
8388 with :
8489 package_json_file : readium/navigators/web/internals/scripts/package.json
8590 run_install : false
8691 - name : Setup cache
87- uses : actions/setup-node@v4
92+ uses : actions/setup-node@v6
8893 with :
8994 node-version : 20
9095 cache : ' pnpm'
0 commit comments