Apache Nutch is an extensible and scalable web crawler
NUTCH-3126 Report JUnit test results in GitHub pull request thread (#863)
Lewis John McGibbney2d92366a5f20
diff --git a/.github/workflows/junit-report.yml b/.github/workflows/junit-report.ymlnew file mode 100644index 000000000..e93a602a2--- /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: [success]+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: master-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 filediff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.ymlindex 4654a82cd..f7265e5b5 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/[email protected]+ - uses: actions/checkout@v5- name: Set up JDK ${{ matrix.java }}- uses: actions/[email protected]+ uses: actions/setup-java@v5with:java-version: ${{ matrix.java }}distribution: 'temurin'@@ -43,9 +43,9 @@ jobs:os: [ubuntu-latest]runs-on: ${{ matrix.os }}steps:- - uses: actions/[email protected]+ - uses: actions/checkout@v5- name: Set up JDK ${{ matrix.java }}- uses: actions/[email protected]+ uses: actions/setup-java@v5with:java-version: ${{ matrix.java }}distribution: 'temurin'@@ -67,9 +67,9 @@ jobs:runs-on: ${{ matrix.os }}timeout-minutes: 30steps:- - uses: actions/[email protected]+ - uses: actions/checkout@v5- name: Set up JDK ${{ matrix.java }}- uses: actions/[email protected]+ uses: actions/setup-java@v5with:java-version: ${{ matrix.java }}distribution: 'temurin'@@ -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 allif: ${{ steps.filter.outputs.buildconf == 'true' || ( steps.filter.outputs.core == 'true' && steps.filter.outputs.plugins == 'true' ) }}@@ -98,3 +99,13 @@ jobs:- name: test pluginsif: ${{ steps.filter.outputs.plugins == 'true' && steps.filter.outputs.core == 'false' && steps.filter.outputs.buildconf == 'false' }}run: ant clean test-plugins -buildfile build.xml+ - name: Upload Test Report+ uses: actions/upload-artifact@v4+ if: always()+ with:+ name: junit-test-results+ path: |+ ./build/test/TEST-*.xml+ ./build/**/test/TEST-*.xml+ retention-days: 1+ overwrite: true\ No newline at end of file