Skip to content

Commit

Permalink
GH Actions: speed up linkcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
MetRonnie committed Jan 30, 2023
1 parent 29f66dd commit 7a7cdad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test_fast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,4 @@ jobs:

- name: Linkcheck
if: startsWith(matrix.python-version, '3.10')
run: pytest -m linkcheck tests/unit
run: pytest -m linkcheck --dist=load tests/unit
5 changes: 5 additions & 0 deletions tests/unit/test_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ def get_links():
@pytest.mark.linkcheck
@pytest.mark.parametrize('link', get_links())
def test_embedded_url(link):
"""Check links in the source code are not broken.
TIP: use `--dist=load` when running pytest to enable parametrized tests
to run in parallel
"""
try:
urllib.request.urlopen(link).getcode()
except urllib.error.HTTPError:
Expand Down

0 comments on commit 7a7cdad

Please sign in to comment.