Skip to content

Commit 0e5c969

Browse files
authored
Improved reporting of errors in 'make doclinkcheck' in GitHub Actions (#2091)
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 <maiera@de.ibm.com>
1 parent 697fb01 commit 0e5c969

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ jobs:
302302
RUN_TYPE: ${{ steps.set-run-type.outputs.result }}
303303
run: |
304304
make doclinkcheck
305-
continue-on-error: true
306305
307306
test_finish:
308307
needs: test

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ docchanges: $(doc_dependent_files)
441441
.PHONY: doclinkcheck
442442
doclinkcheck: $(doc_dependent_files)
443443
@echo "Running Sphinx to check the doc links"
444-
$(doc_cmd) -b linkcheck $(doc_opts) $(doc_build_dir)/linkcheck
444+
@bash -c '$(doc_cmd) -b linkcheck $(doc_opts) $(doc_build_dir)/linkcheck; rc=$$?; if [ $$rc -ne 0 ]; then echo "::notice::doclinkcheck failed (ignored)"; fi'
445445
@echo
446446
@echo "Done: Look for any errors in the above output or in: $(doc_build_dir)/linkcheck/output.txt"
447447
@echo "Makefile: $@ done."
@@ -661,7 +661,7 @@ $(done_dir)/check_reqs_$(pymn)_$(PACKAGE_LEVEL).done: Makefile $(done_dir)/devel
661661
@echo "Makefile: Checking missing dependencies of this package"
662662
cat requirements.txt extra-testutils-requirements.txt >tmp_requirements.txt
663663
pip-missing-reqs $(package_name) --ignore-module $(package_name) --ignore-module $(mock_package_name) --requirements-file=tmp_requirements.txt
664-
$(call RM_FUNC,tmp_requirements.txt)
664+
-$(call RM_FUNC,tmp_requirements.txt)
665665
pip-missing-reqs $(package_name) --ignore-module $(package_name) --ignore-module $(mock_package_name) --requirements-file=minimum-constraints-install.txt
666666
@echo "Makefile: Done checking missing dependencies of this package"
667667
ifeq ($(PLATFORM),Windows_native)

0 commit comments

Comments
 (0)