From 8bd993f66ba8bc705b2f050665904ea412dd7492 Mon Sep 17 00:00:00 2001 From: lewismc Date: Fri, 12 Sep 2025 13:15:31 -0700 Subject: [PATCH 01/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 4654a82cdb..9071b5e96e 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -86,6 +86,7 @@ jobs: buildconf: - 'build.xml' - 'ivy/ivy.xml' + - '.github/workflows/*' # run if the build configuration or both 'core' and 'plugins' files were changed - name: test all if: ${{ steps.filter.outputs.buildconf == 'true' || ( steps.filter.outputs.core == 'true' && steps.filter.outputs.plugins == 'true' ) }} @@ -98,3 +99,16 @@ jobs: - name: test plugins if: ${{ steps.filter.outputs.plugins == 'true' && steps.filter.outputs.core == 'false' && steps.filter.outputs.buildconf == 'false' }} run: ant clean test-plugins -buildfile build.xml + - name: Publish JUnit Test Report + uses: mikepenz/action-junit-report@v5 + if: always() # always run even if the previous step fails + with: + report_paths: '/home/runner/work/nutch/nutch/build/test/TEST-*.xml,/home/runner/work/nutch/nutch/build/**/test/TEST-*.xml' + detailed_summary: true + flaky_summary: true + annotate_only: true + fail_on_failure: true + fail_on_parse_error: true + check_retries: true + truncate_stack_traces: false + require_tests: true \ No newline at end of file From ba7d8626c962d9693cbbbba679e66d76d982a543 Mon Sep 17 00:00:00 2001 From: lewismc Date: Fri, 12 Sep 2025 13:30:50 -0700 Subject: [PATCH 02/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 9071b5e96e..069fb94905 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -103,7 +103,7 @@ jobs: uses: mikepenz/action-junit-report@v5 if: always() # always run even if the previous step fails with: - report_paths: '/home/runner/work/nutch/nutch/build/test/TEST-*.xml,/home/runner/work/nutch/nutch/build/**/test/TEST-*.xml' + report_paths: '**/build/test/TEST-*.xml,**/build/**/test/TEST-*.xml' detailed_summary: true flaky_summary: true annotate_only: true From 15b4affa05de09e5f1f3467b20e825d2e27792fc Mon Sep 17 00:00:00 2001 From: lewismc Date: Fri, 12 Sep 2025 16:23:24 -0700 Subject: [PATCH 03/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 069fb94905..8c9a1f5bab 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -99,11 +99,13 @@ jobs: - name: test plugins if: ${{ steps.filter.outputs.plugins == 'true' && steps.filter.outputs.core == 'false' && steps.filter.outputs.buildconf == 'false' }} run: ant clean test-plugins -buildfile build.xml + - name: Find Test Report Files + run: find . -name 'TEST-*.xml' - name: Publish JUnit Test Report uses: mikepenz/action-junit-report@v5 if: always() # always run even if the previous step fails with: - report_paths: '**/build/test/TEST-*.xml,**/build/**/test/TEST-*.xml' + report_paths: '/home/runner/work/nutch/nutch/build/test/TEST-*.xml,/home/runner/work/nutch/nutch/build/**/test/TEST-*.xml' detailed_summary: true flaky_summary: true annotate_only: true From 67d3ea7ededfe265265f9deffa3bb8d2ba46323f Mon Sep 17 00:00:00 2001 From: lewismc Date: Wed, 17 Sep 2025 20:43:46 -0700 Subject: [PATCH 04/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 8c9a1f5bab..9b4d7170f3 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -105,7 +105,9 @@ jobs: uses: mikepenz/action-junit-report@v5 if: always() # always run even if the previous step fails with: - report_paths: '/home/runner/work/nutch/nutch/build/test/TEST-*.xml,/home/runner/work/nutch/nutch/build/**/test/TEST-*.xml' + report_paths: |- + ./build/test/TEST-*.xml + ./build/**/test/TEST-*.xml detailed_summary: true flaky_summary: true annotate_only: true From 47de8b9fc45a26b1ebd2d8841239c30aa6931bb5 Mon Sep 17 00:00:00 2001 From: lewismc Date: Wed, 17 Sep 2025 21:13:40 -0700 Subject: [PATCH 05/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 9b4d7170f3..e8e9c79845 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -101,18 +101,14 @@ jobs: run: ant clean test-plugins -buildfile build.xml - name: Find Test Report Files run: find . -name 'TEST-*.xml' - - name: Publish JUnit Test Report + - name: Publish Test Report uses: mikepenz/action-junit-report@v5 - if: always() # always run even if the previous step fails + if: success() || failure() # always run even if the previous step fails with: report_paths: |- ./build/test/TEST-*.xml ./build/**/test/TEST-*.xml - detailed_summary: true - flaky_summary: true - annotate_only: true + check_name: 'Nutch JUnit Test Report' fail_on_failure: true - fail_on_parse_error: true - check_retries: true - truncate_stack_traces: false - require_tests: true \ No newline at end of file + job_summary: true + detailed_summary: true \ No newline at end of file From af371b79f096a91df8cd51a9e13ac9923f422245 Mon Sep 17 00:00:00 2001 From: lewismc Date: Wed, 17 Sep 2025 21:47:01 -0700 Subject: [PATCH 06/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index e8e9c79845..b50efb3ed4 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -99,8 +99,6 @@ jobs: - name: test plugins if: ${{ steps.filter.outputs.plugins == 'true' && steps.filter.outputs.core == 'false' && steps.filter.outputs.buildconf == 'false' }} run: ant clean test-plugins -buildfile build.xml - - name: Find Test Report Files - run: find . -name 'TEST-*.xml' - name: Publish Test Report uses: mikepenz/action-junit-report@v5 if: success() || failure() # always run even if the previous step fails @@ -108,7 +106,12 @@ jobs: report_paths: |- ./build/test/TEST-*.xml ./build/**/test/TEST-*.xml - check_name: 'Nutch JUnit Test Report' fail_on_failure: true job_summary: true - detailed_summary: true \ No newline at end of file + detailed_summary: true + truncate_stack_traces: false + fail_on_parse_error: true + require_tests: true + detailed_summary: true + include_time_in_summary: true + comment: true \ No newline at end of file From eac53dd1acd96d99bab4cbb75bd1fa9143034e86 Mon Sep 17 00:00:00 2001 From: lewismc Date: Wed, 17 Sep 2025 21:51:17 -0700 Subject: [PATCH 07/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index b50efb3ed4..a3990df69a 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -112,6 +112,5 @@ jobs: truncate_stack_traces: false fail_on_parse_error: true require_tests: true - detailed_summary: true include_time_in_summary: true comment: true \ No newline at end of file From d64a7080befed13ba62a65627f3fb750c29f5eae Mon Sep 17 00:00:00 2001 From: lewismc Date: Sun, 28 Sep 2025 18:01:27 -0700 Subject: [PATCH 08/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index a3990df69a..636569a25f 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -20,6 +20,9 @@ on: pull_request: types: [opened, synchronize, reopened] branches: [master] +permissions: + checks: write + pull-requests: write jobs: javadoc: strategy: From db20d3bb6023dabda90ed990a7da542e3075f5e5 Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 08:05:59 -0700 Subject: [PATCH 09/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 636569a25f..74b91ff0da 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -116,4 +116,5 @@ jobs: fail_on_parse_error: true require_tests: true include_time_in_summary: true - comment: true \ No newline at end of file + comment: true + include_passed: true \ No newline at end of file From 7447beefb86b3a398fcdc0d394cebeb6a5e91d84 Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 19:44:27 -0700 Subject: [PATCH 10/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/junit-report.yml | 52 ++++++++++++++++++++++++++++++ .github/workflows/master-build.yml | 22 ++++--------- 2 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/junit-report.yml diff --git a/.github/workflows/junit-report.yml b/.github/workflows/junit-report.yml new file mode 100644 index 0000000000..08faf81540 --- /dev/null +++ b/.github/workflows/junit-report.yml @@ -0,0 +1,52 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: junit report +on: + workflow_run: + workflows: [master pull request ci] + types: [completed] +permissions: + checks: write + pull-requests: write +jobs: + checks: + runs-on: ubuntu-latest + steps: + - name: Download Test Report + uses: dawidd6/action-download-artifact@v11 + with: + name: junit-test-results + workflow: build.yml + run_id: ${{ github.event.workflow_run.id }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v5 + with: + report_paths: |- + ./build/test/TEST-*.xml + ./build/**/test/TEST-*.xml + commit: ${{ github.event.workflow_run.head_sha }} + comment: true + pr_id: ${{ github.event.workflow_run.pull_requests[0].number }} + fail_on_failure: true + job_summary: true + detailed_summary: true + truncate_stack_traces: false + fail_on_parse_error: false # temporary while debugging TestMimeUtil + require_tests: true + include_time_in_summary: true + include_passed: true + job_name: tests + check_name: 'JUnit Test Report Core, JUnit Test Report Plugins' \ No newline at end of file diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index 74b91ff0da..fcc094936c 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -20,9 +20,6 @@ on: pull_request: types: [opened, synchronize, reopened] branches: [master] -permissions: - checks: write - pull-requests: write jobs: javadoc: strategy: @@ -102,19 +99,12 @@ jobs: - name: test plugins if: ${{ steps.filter.outputs.plugins == 'true' && steps.filter.outputs.core == 'false' && steps.filter.outputs.buildconf == 'false' }} run: ant clean test-plugins -buildfile build.xml - - name: Publish Test Report - uses: mikepenz/action-junit-report@v5 - if: success() || failure() # always run even if the previous step fails + - name: Upload Test Report + uses: actions/upload-artifact@v4 + if: always() with: - report_paths: |- + name: junit-test-results + path: | ./build/test/TEST-*.xml ./build/**/test/TEST-*.xml - fail_on_failure: true - job_summary: true - detailed_summary: true - truncate_stack_traces: false - fail_on_parse_error: true - require_tests: true - include_time_in_summary: true - comment: true - include_passed: true \ No newline at end of file + retention-days: 1 \ No newline at end of file From d721db54d3a408f29ea83ed844696b9661e0fc61 Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 19:45:40 -0700 Subject: [PATCH 11/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/junit-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/junit-report.yml b/.github/workflows/junit-report.yml index 08faf81540..08362c8dae 100644 --- a/.github/workflows/junit-report.yml +++ b/.github/workflows/junit-report.yml @@ -29,7 +29,7 @@ jobs: uses: dawidd6/action-download-artifact@v11 with: name: junit-test-results - workflow: build.yml + workflow: master-build.yml run_id: ${{ github.event.workflow_run.id }} - name: Publish Test Report uses: mikepenz/action-junit-report@v5 From 1f9a75ef501e2deb7ed21c8f1bf85830cebd944b Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 20:16:10 -0700 Subject: [PATCH 12/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/master-build.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index fcc094936c..f7265e5b52 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -28,9 +28,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v5 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -43,9 +43,9 @@ jobs: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v5 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -67,9 +67,9 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 30 steps: - - uses: actions/checkout@v4.2.2 + - uses: actions/checkout@v5 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4.5.0 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java }} distribution: 'temurin' @@ -107,4 +107,5 @@ jobs: path: | ./build/test/TEST-*.xml ./build/**/test/TEST-*.xml - retention-days: 1 \ No newline at end of file + retention-days: 1 + overwrite: true \ No newline at end of file From da5f449452d9dd3eea8c81a3a523efb0b9e415d7 Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 20:38:54 -0700 Subject: [PATCH 13/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/junit-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/junit-report.yml b/.github/workflows/junit-report.yml index 08362c8dae..022152cf40 100644 --- a/.github/workflows/junit-report.yml +++ b/.github/workflows/junit-report.yml @@ -16,7 +16,7 @@ name: junit report on: workflow_run: - workflows: [master pull request ci] + workflows: [master-build] types: [completed] permissions: checks: write From bcf36c00cd8ab28844f0aaafc585389af64a03f2 Mon Sep 17 00:00:00 2001 From: lewismc Date: Thu, 9 Oct 2025 20:43:42 -0700 Subject: [PATCH 14/14] NUTCH-3126 Report JUnit test results in GitHub pull request thread --- .github/workflows/junit-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/junit-report.yml b/.github/workflows/junit-report.yml index 022152cf40..e93a602a26 100644 --- a/.github/workflows/junit-report.yml +++ b/.github/workflows/junit-report.yml @@ -16,8 +16,8 @@ name: junit report on: workflow_run: - workflows: [master-build] - types: [completed] + workflows: [master pull request ci] + types: [success] permissions: checks: write pull-requests: write