From 4b75f18b6d3b7a374e7c14fb7f042f4fde9764f5 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Wed, 4 Feb 2026 06:24:29 +0100 Subject: [PATCH] Improved reporting of errors in 'make doclinkcheck' in GitHub Actions Details: * Currently, errors detected by the Sphinx command in the 'doclinkcheck' make rule are handled in the Actions workflow step by ignoring the error. That causes an error to be shown in the Actions summary, without any information which step failed or what the error was. This change improves that by moving the ignoring of the error into the make commands, and by echoing a message that includes the string '::notice::' which causes the echoed string to be shown as an info message in the Actions summary. Signed-off-by: Andreas Maier --- .github/workflows/test.yml | 1 - Makefile | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4245b362..1b7032b1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -302,7 +302,6 @@ jobs: RUN_TYPE: ${{ steps.set-run-type.outputs.result }} run: | make doclinkcheck - continue-on-error: true test_finish: needs: test diff --git a/Makefile b/Makefile index 0c6603ac..ad6f0f8b 100644 --- a/Makefile +++ b/Makefile @@ -441,7 +441,7 @@ docchanges: $(doc_dependent_files) .PHONY: doclinkcheck doclinkcheck: $(doc_dependent_files) @echo "Running Sphinx to check the doc links" - $(doc_cmd) -b linkcheck $(doc_opts) $(doc_build_dir)/linkcheck + @bash -c '$(doc_cmd) -b linkcheck $(doc_opts) $(doc_build_dir)/linkcheck; rc=$$?; if [ $$rc -ne 0 ]; then echo "::notice::doclinkcheck failed (ignored)"; fi' @echo @echo "Done: Look for any errors in the above output or in: $(doc_build_dir)/linkcheck/output.txt" @echo "Makefile: $@ done." @@ -661,7 +661,7 @@ $(done_dir)/check_reqs_$(pymn)_$(PACKAGE_LEVEL).done: Makefile $(done_dir)/devel @echo "Makefile: Checking missing dependencies of this package" cat requirements.txt extra-testutils-requirements.txt >tmp_requirements.txt pip-missing-reqs $(package_name) --ignore-module $(package_name) --ignore-module $(mock_package_name) --requirements-file=tmp_requirements.txt - $(call RM_FUNC,tmp_requirements.txt) + -$(call RM_FUNC,tmp_requirements.txt) pip-missing-reqs $(package_name) --ignore-module $(package_name) --ignore-module $(mock_package_name) --requirements-file=minimum-constraints-install.txt @echo "Makefile: Done checking missing dependencies of this package" ifeq ($(PLATFORM),Windows_native)