Unsubscribe
Yahoo Mail: Search, Organize, Conquer
This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new 7c5a529dc NUTCH-3143 GitHub workflow does not run all unit tests (#889)
7c5a529dc is described below
commit 7c5a529dc372e905c7d6e585f68fe88071bddd0b
Author: Lewis John McGibbney <[email protected]>
AuthorDate: Tue Jan 20 21:04:49 2026 -0800
NUTCH-3143 GitHub workflow does not run all unit tests (#889)
---
.github/workflows/junit-report.yml | 33 ++++-----------------------------
.github/workflows/master-build.yml | 17 ++++++++++++-----
2 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/.github/workflows/junit-report.yml
b/.github/workflows/junit-report.yml
index 23a251a58..06be656a9 100644
--- a/.github/workflows/junit-report.yml
+++ b/.github/workflows/junit-report.yml
@@ -31,48 +31,23 @@ jobs:
name: junit-test-results-ubuntu-latest
workflow: master-build.yml
run_id: ${{ github.event.workflow_run.id }}
- path: ./results-ubuntu
continue-on-error: true
- - name: Download Test Report (macOS)
- uses: dawidd6/action-download-artifact@v11
- with:
- name: junit-test-results-macos-latest
- workflow: master-build.yml
- run_id: ${{ github.event.workflow_run.id }}
- path: ./results-macos
- continue-on-error: true
- - name: Debug XML files
- if: always()
- run: |
- echo "=== Listing downloaded artifacts ==="
- find ./results-ubuntu ./results-macos -name "TEST-*.xml" 2>/dev/null
| head -20 || echo "No files found"
- echo ""
- echo "=== TestCommonCrawlDataDumper.xml (macOS) ==="
- cat
./results-macos/test/TEST-org.apache.nutch.tools.TestCommonCrawlDataDumper.xml
2>/dev/null || echo "File not found"
- echo ""
- echo "=== TestCommonCrawlDataDumper.xml (Ubuntu) ==="
- cat
./results-ubuntu/test/TEST-org.apache.nutch.tools.TestCommonCrawlDataDumper.xml
2>/dev/null || echo "File not found"
- echo ""
- echo "=== TestPrefixStringMatcher.xml (Ubuntu) ==="
- cat
./results-ubuntu/test/TEST-org.apache.nutch.util.TestPrefixStringMatcher.xml
2>/dev/null || echo "File not found"
- echo ""
- echo "=== TestPrefixStringMatcher.xml (macOS) ==="
- cat
./results-macos/test/TEST-org.apache.nutch.util.TestPrefixStringMatcher.xml
2>/dev/null || echo "File not found"
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
with:
report_paths: |-
- ./results-ubuntu/**/TEST-*.xml
- ./results-macos/**/TEST-*.xml
+ ./test/TEST-*.xml
+ ./**/test/TEST-*.xml
check_name: |-
JUnit Test Report
JUnit Test Report Plugins
commit: ${{ github.event.workflow_run.head_sha }}
fail_on_failure: false
- fail_on_parse_error: false
+ fail_on_parse_error: true
require_tests: true
require_passed_tests: true
include_passed: false
+ include_skipped: true
check_annotations: true
annotate_notice: true
job_summary: true
diff --git a/.github/workflows/master-build.yml
b/.github/workflows/master-build.yml
index 153c09b93..d73bb3a69 100644
--- a/.github/workflows/master-build.yml
+++ b/.github/workflows/master-build.yml
@@ -120,13 +120,20 @@ 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
- # fallback: run all tests if no specific filter matched (e.g., docs-only
changes)
- - name: test all (fallback)
- if: ${{ steps.filter.outputs.buildconf == 'false' &&
steps.filter.outputs.core == 'false' && steps.filter.outputs.plugins == 'false'
}}
- run: ant clean test -buildfile build.xml
+ - name: Check for test results
+ id: check_tests
+ if: always() && matrix.os == 'ubuntu-latest'
+ run: |
+ shopt -s globstar nullglob
+ files=(./build/test/TEST-*.xml ./build/**/test/TEST-*.xml)
+ if [ ${#files[@]} -gt 0 ]; then
+ echo "has_results=true" >> $GITHUB_OUTPUT
+ else
+ echo "has_results=false" >> $GITHUB_OUTPUT
+ fi
- name: Upload Test Report
uses: actions/upload-artifact@v4
- if: always()
+ if: always() && matrix.os == 'ubuntu-latest' &&
steps.check_tests.outputs.has_results == 'true'
with:
name: junit-test-results-${{ matrix.os }}
path: |