@@ -19,21 +19,52 @@ permissions:
1919jobs :
2020 build :
2121 runs-on : ubuntu-latest
22- steps :
23- - name : Checkout Repository
24- uses : actions/checkout@v3
25- - name : Set up JDK 21
26- uses : actions/setup-java@v3
27- with :
28- java-version : ' 21'
29- distribution : ' oracle'
30- - name : Setup Gradle
31- uses : gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
32- - name : Setup Maven
33- uses : stCarolas/setup-maven@v4.5
34- with :
35- maven-version : 3.9.0
36- - name : Build
37- run : ./gradlew build -x test
38- - name : Test
39- run : ./gradlew test -PexcludeCategory="gin.category.LocalTest"
22+ # These env vars are inherited by all steps and child JVMs (Gradle, Maven Invoker forks, your TestHarness).
23+ env :
24+ # Make tinylog and any System.out/err visible in the Actions log
25+ JAVA_TOOL_OPTIONS : >-
26+ -Dtinylog.writer=console
27+ -Dtinylog.level=trace
28+ -Dtinylog.format={date} {level} [{thread}] {class}.{method}(): {message}
29+ -Dorg.slf4j.simpleLogger.defaultLogLevel=debug
30+ # Optional: keep Maven a bit more predictable
31+ MAVEN_OPTS : " -Xms256m -Xmx2g"
32+
33+ steps :
34+ - name : Checkout Repository
35+ uses : actions/checkout@v4
36+
37+ - name : Set up JDK 21
38+ uses : actions/setup-java@v4
39+ with :
40+ java-version : ' 21'
41+ distribution : ' oracle' # fine; Temurin also works if you prefer
42+
43+ - name : Setup Gradle
44+ uses : gradle/gradle-build-action@v3
45+
46+ - name : Setup Maven
47+ uses : stCarolas/setup-maven@v4.5
48+ with :
49+ maven-version : 3.9.0
50+
51+ # Build without tests
52+ - name : Build
53+ run : ./gradlew build -x test --info --stacktrace | tee build.log
54+
55+ # Run tests with verbose logging
56+ - name : Test
57+ run : ./gradlew test -PexcludeCategory="gin.category.LocalTest" --info --stacktrace | tee test.log
58+
59+ # Always upload logs and reports so we can inspect surefire/gradle outputs when something fails.
60+ - name : Upload logs & reports
61+ if : always()
62+ uses : actions/upload-artifact@v4
63+ with :
64+ name : build-outputs
65+ path : |
66+ build.log
67+ test.log
68+ **/build/reports/tests/**
69+ **/surefire-reports/**
70+ **/failsafe-reports/**
0 commit comments