Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving linkcheck #463

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,23 @@ jobs:
- name: "Run build test"
run: |
make test
- name: "Linkcheck"
- name: "Get changed files"
id: "changed-files"
uses: "tj-actions/changed-files@v24"
- name: "Run linkcheck on .rst files"
run: |
make linkcheck
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [ "${file: -4}" == ".rst" ]
then
var="$var $file"
fi
done
if [ -z "$var" ]
then
echo "No *.rst changed files to check."
else
make files="$var" linkcheck-specified-files
fi
lint:
name: "Linting"
runs-on: "ubuntu-22.04"
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ changes:
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
.PHONY: linkcheck-specified-files
linkcheck-specified-files:
$(SPHINXBUILD) -q -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR) $(files)
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
Expand Down
Loading