Skip to content

Commit 8309329

Browse files
committed
Archive crash logs
1 parent 3a036e6 commit 8309329

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/gradle.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,12 @@ jobs:
1717
- name: Setup Gradle
1818
uses: gradle/gradle-build-action@v3
1919
- name: Run build with Gradle Wrapper
20-
run: ./gradlew build
20+
run: ./gradlew build -PgearHeads.testJvmArg='-XX:ErrorFile=${{ github.workspace }}/hs_err_pid%p.log'
21+
- name: Archive test artifacts
22+
if: success() || failure()
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: test-logs
26+
path: |
27+
*/build/reports/tests/test
28+
hs_err_pid*.log

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ bin
99

1010
ctre_sim
1111

12+
# JVM crash logs; see http://www.java.com/en/download/help/error_hotspot.xml
13+
hs_err_pid*
1214

1315
# Created by https://www.toptal.com/developers/gitignore/api/intellij
1416
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij

buildSrc/src/main/groovy/java-common-conventions.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ tasks.withType(JavaCompile).configureEach {
2020

2121
tasks.withType(Test).configureEach { testTask ->
2222

23+
if (project.hasProperty('gearHeads.testJvmArg')) {
24+
jvmArgs project.properties['gearHeads.testJvmArg']
25+
}
26+
2327
testLogging {
2428
// set options for log level LIFECYCLE
2529
events TestLogEvent.FAILED,

0 commit comments

Comments
 (0)