This repository was archived by the owner on Jan 24, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,26 +12,35 @@ jobs:
1212
1313 steps :
1414 - uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 1 # Shallow clone for faster checkout
1517
1618 - name : Set up JDK 17
1719 uses : actions/setup-java@v4
1820 with :
1921 java-version : ' 17'
2022 distribution : ' temurin'
23+ cache : ' gradle'
2124
22- - name : Setup Node.js
23- uses : actions/setup-node@v4
25+ - name : Cache Gradle packages
26+ uses : actions/cache@v3
2427 with :
25- node-version : ' 20'
26-
27- - name : Install dependencies
28- run : npm install
29-
30- - name : Check Java formatting
31- run : ./gradlew checkJavaFormat
28+ path : |
29+ ~/.gradle/caches
30+ ~/.gradle/wrapper
31+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
32+ restore-keys : |
33+ ${{ runner.os }}-gradle-
3234
33- - name : Compile code
34- run : ./gradlew compileJava
35+ - name : Check Java formatting and compile (parallel)
36+ run : ./gradlew checkJavaFormat compileJava --parallel --max-workers=4
3537
3638 - name : Run tests
37- run : ./gradlew test
39+ run : ./gradlew test --parallel --max-workers=4
40+
41+ - name : Cleanup Gradle Cache
42+ # Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
43+ # Restoring these files from a GitHub Actions cache might cause problems for future builds.
44+ run : |
45+ rm -f ~/.gradle/caches/modules-2/modules-2.lock
46+ rm -f ~/.gradle/caches/modules-2/gc.properties
Original file line number Diff line number Diff line change 1+ # Gradle performance improvements
2+ org.gradle.jvmargs =-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError
3+ org.gradle.parallel =true
4+ org.gradle.caching =true
5+ org.gradle.configureondemand =true
6+
7+ # Avoid warning about deprecated Gradle features
8+ org.gradle.warning.mode =none
You can’t perform that action at this time.
0 commit comments