Skip to content

Commit 26bad87

Browse files
authored
Change testing to only cover latest sphinx version (#167)
* Change testing to only cover latest sphinx version * Fix Actions yaml syntax * Update regression test outputs * Remove testing matrix for pygments versions * Add weekly scheduled test run * Bump docutils version pin
1 parent b9fd7d8 commit 26bad87

File tree

6 files changed

+6
-70
lines changed

6 files changed

+6
-70
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
tags:
1010
- 'v*'
1111
pull_request:
12+
# Run weekly to check for breaking changes in unpinned dependencies
13+
schedule:
14+
- cron: '0 18 * * 5'
1215

1316
jobs:
1417

@@ -18,8 +21,6 @@ jobs:
1821
strategy:
1922
matrix:
2023
python-version: ["3.7", "3.8", "3.9", "3.10"]
21-
sphinx: [">=3,<4", ">=5,<6"]
22-
pygments: ["==2.8.0", "==2.9.0", "==2.12.0",]
2324

2425
steps:
2526
- uses: actions/checkout@v2
@@ -30,17 +31,15 @@ jobs:
3031
- name: Install dependencies
3132
run: |
3233
python -m pip install --upgrade pip
33-
pip install "sphinx${{ matrix.sphinx }}"
34-
pip install "pygments${{ matrix.pygments }}"
3534
pip install .[testing]
3635
- name: Run pytest
3736
run: |
3837
pytest --cov=sphinx_tabs --cov-report=xml --cov-report=term-missing
3938
- name: Upload to Codecov
40-
if: matrix.python-version == 3.7 && matrix.sphinx == '>=3,<4' && github.repository == 'executablebooks/sphinx-tabs'
39+
if: matrix.python-version == '3.10' && github.repository == 'executablebooks/sphinx-tabs'
4140
uses: codecov/codecov-action@v1
4241
with:
43-
name: sphinx-tabs-pytests-py3.7
42+
name: sphinx-tabs-pytests-py3.10
4443
flags: pytests
4544
file: ./coverage.xml
4645
fail_ci_if_error: true

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def get_version():
2525
url="https://github.com/executablebooks/sphinx-tabs",
2626
license="MIT",
2727
python_requires="~=3.7",
28-
install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0", "jinja2<3.1.0"],
28+
install_requires=["sphinx", "pygments", "docutils~=0.18.0"],
2929
extras_require={
3030
"testing": [
3131
"coverage",

tests/test_build.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ def test_conditional_assets(app, docname, check_asset_links):
2828
@pytest.mark.noautobuild
2929
@pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
3030
@pytest.mark.sphinx(testroot="conditionalassets-policy")
31-
@pytest.mark.skipif(
32-
sphinx.version_info[:2] < (4, 1),
33-
reason="Test uses option that was introduced in Sphinx 4.1 ",
34-
)
3531
def test_conditional_assets_html_assets_policy(
3632
app,
3733
docname,
@@ -56,21 +52,10 @@ def test_conditional_assets_html_assets_policy(
5652

5753

5854
@pytest.mark.sphinx(testroot="linenos")
59-
@pytest.mark.skipif(
60-
sphinx.version_info[:2] >= (4, 0), reason="Test uses Sphinx 3 code blocks"
61-
)
6255
def test_other_with_assets(app, check_asset_links):
6356
check_asset_links(app)
6457

6558

66-
@pytest.mark.sphinx(testroot="linenos")
67-
@pytest.mark.skipif(
68-
sphinx.version_info[:2] < (4, 0), reason="Test uses Sphinx 4 code blocks"
69-
)
70-
def test_other_with_assets_new_style(app, check_asset_links):
71-
check_asset_links(app)
72-
73-
7459
@pytest.mark.sphinx(testroot="nestedmarkup")
7560
def test_nested_markup(app, check_asset_links):
7661
check_asset_links(app)

tests/test_build/test_other_with_assets.html

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,6 @@
1212
</div>
1313
<div aria-labelledby="tab-0-Qysr" class="sphinx-tabs-panel code-tab group-tab" id="panel-0-Qysr" name="Qysr" role="tabpanel" tabindex="0">
1414
<div class="highlight-c++ notranslate">
15-
<table class="highlighttable">
16-
<tr>
17-
<td class="linenos">
18-
<div class="linenodiv">
19-
<pre><span class="normal">1</span></pre>
20-
</div>
21-
</td>
22-
<td class="code">
23-
</td>
24-
</tr>
25-
</table>
2615
</div>
2716
</div>
2817
<div aria-labelledby="tab-0-UHl0aG9u" class="sphinx-tabs-panel code-tab group-tab" hidden="true" id="panel-0-UHl0aG9u" name="UHl0aG9u" role="tabpanel" tabindex="0">

tests/test_build/test_other_with_assets_new_style.html

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/test_build/test_other_with_assets_new_style.xml

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)