Skip to content

Commit d9c8c7f

Browse files
authored
Remove linkcheck test and move it to its own job (#245)
Remove the linkcheck tests from tests.py. Run a make linkcheck in GitHub Actions as its own job.
1 parent 2f00216 commit d9c8c7f

File tree

2 files changed

+28
-10
lines changed

2 files changed

+28
-10
lines changed

.github/workflows/test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,31 @@ jobs:
3333

3434
- name: Test with pytest
3535
run: pytest -s -v tests
36+
37+
38+
linkcheck:
39+
runs-on: ubuntu-latest
40+
env:
41+
PYTHON: "3.9"
42+
43+
steps:
44+
- name: Checkout
45+
uses: actions/checkout@v4
46+
with:
47+
persist-credentials: false
48+
49+
- name: Set up Python
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ env.PYTHON }}
53+
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install -r requirements.txt -r requirements-dev.txt
58+
59+
- name: List installed packages
60+
run: pip list
61+
62+
- name: Check links
63+
run: make linkcheck

tests/test_docs.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ def test_images(self):
3636
# "%s"%(latex_path)])
3737
# assert check == 0
3838

39-
def test_linkcheck(self):
40-
doctrees_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build']+['doctrees'])
41-
link_path = os.path.sep.join(self.path_to_docs.split(os.path.sep) + ['_build'])
42-
43-
check = subprocess.call(["sphinx-build", "-nW", "-b", "linkcheck", "-d",
44-
"%s"%(doctrees_path),
45-
"%s"%(self.path_to_docs),
46-
"%s"%(link_path)])
47-
assert check == 0
48-
4939

5040
if __name__ == '__main__':
5141
unittest.main()

0 commit comments

Comments
 (0)