From e9308b0af25b0e138a532f2aa5dd6e30936aba94 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:18:29 -0700 Subject: [PATCH 1/8] Add test reporting See also https://github.com/marketplace/actions/test-reporter --- .github/workflows/gradle.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d962bb0..546dbbd 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -25,4 +25,11 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build + run: ./gradlew build && ls -latr + - name: Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() # run this step even if previous step failed + with: + name: JEST Tests # Name of the check run which will be created + path: reports/jest-*.xml # Path to test results + reporter: jest-junit # Format of test results From 2300d3b7aafb4597afd5c9de1d1787e07a92adf8 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:22:11 -0700 Subject: [PATCH 2/8] Debug build directory for test reports --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 546dbbd..c1eb1c9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -25,7 +25,7 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Build with Gradle - run: ./gradlew build && ls -latr + run: ./gradlew build && ls -latrR build - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() # run this step even if previous step failed From fad30e3015c4f00767291e51c7b1276c1da38d9a Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:24:38 -0700 Subject: [PATCH 3/8] Update path --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c1eb1c9..3e301d8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,5 +31,5 @@ jobs: if: success() || failure() # run this step even if previous step failed with: name: JEST Tests # Name of the check run which will be created - path: reports/jest-*.xml # Path to test results + path: build/test-results/*.xml # Path to test results reporter: jest-junit # Format of test results From 5b1f5a4c9d14cde3830217d9dee26a89a5d43df5 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:27:40 -0700 Subject: [PATCH 4/8] Switch to java junit --- .github/workflows/gradle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3e301d8..7616f37 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -30,6 +30,6 @@ jobs: uses: dorny/test-reporter@v1 if: success() || failure() # run this step even if previous step failed with: - name: JEST Tests # Name of the check run which will be created + name: Junit Tests # Name of the check run which will be created path: build/test-results/*.xml # Path to test results - reporter: jest-junit # Format of test results + reporter: java-junit # Format of test results From 9319afe3b97c6283ab0198f10d1222d154b440f3 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:29:31 -0700 Subject: [PATCH 5/8] Update path to be relative to build dir and to include mistakenly omitted test dir --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 7616f37..781508a 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,5 +31,5 @@ jobs: if: success() || failure() # run this step even if previous step failed with: name: Junit Tests # Name of the check run which will be created - path: build/test-results/*.xml # Path to test results + path: test-results/test/*.xml # Path to test results reporter: java-junit # Format of test results From b7e8696f998adcdf2b06504f99574c8d7ebcc97b Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:31:14 -0700 Subject: [PATCH 6/8] Try simplifying path --- .github/workflows/gradle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 781508a..c7580f2 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,5 +31,5 @@ jobs: if: success() || failure() # run this step even if previous step failed with: name: Junit Tests # Name of the check run which will be created - path: test-results/test/*.xml # Path to test results + path: test/*.xml # Path to test results reporter: java-junit # Format of test results From 0b598814b212578ad55b90a848b0358193d25a61 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:33:26 -0700 Subject: [PATCH 7/8] Try using junit-report-action instead --- .github/workflows/gradle.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c7580f2..2e04649 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -27,9 +27,7 @@ jobs: - name: Build with Gradle run: ./gradlew build && ls -latrR build - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() # run this step even if previous step failed + uses: mikepenz/action-junit-report@v4 + if: success() || failure() # always run even if the previous step fails with: - name: Junit Tests # Name of the check run which will be created - path: test/*.xml # Path to test results - reporter: java-junit # Format of test results + report_paths: '**/build/test-results/test/TEST-*.xml' From 86a8866f53b11b63c7a141d99565b61c7d435150 Mon Sep 17 00:00:00 2001 From: Kevin VanDenBreemen Date: Thu, 2 Nov 2023 15:36:48 -0700 Subject: [PATCH 8/8] Try providing additional details --- .github/workflows/gradle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 2e04649..8510f01 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -31,3 +31,5 @@ jobs: if: success() || failure() # always run even if the previous step fails with: report_paths: '**/build/test-results/test/TEST-*.xml' + include_passed: true + detailed_summary: true