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

Change testing to only cover latest sphinx version #167

Merged
merged 6 commits into from
Jul 2, 2022
Merged
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
11 changes: 5 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
tags:
- 'v*'
pull_request:
# Run weekly to check for breaking changes in unpinned dependencies
schedule:
- cron: '0 18 * * 5'

jobs:

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

steps:
- uses: actions/checkout@v2
Expand All @@ -30,17 +31,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "sphinx${{ matrix.sphinx }}"
pip install "pygments${{ matrix.pygments }}"
pip install .[testing]
- name: Run pytest
run: |
pytest --cov=sphinx_tabs --cov-report=xml --cov-report=term-missing
- name: Upload to Codecov
if: matrix.python-version == 3.7 && matrix.sphinx == '>=3,<4' && github.repository == 'executablebooks/sphinx-tabs'
if: matrix.python-version == '3.10' && github.repository == 'executablebooks/sphinx-tabs'
uses: codecov/codecov-action@v1
with:
name: sphinx-tabs-pytests-py3.7
name: sphinx-tabs-pytests-py3.10
flags: pytests
file: ./coverage.xml
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def get_version():
url="https://github.com/executablebooks/sphinx-tabs",
license="MIT",
python_requires="~=3.7",
install_requires=["sphinx>=2,<6", "pygments", "docutils~=0.17.0", "jinja2<3.1.0"],
install_requires=["sphinx", "pygments", "docutils~=0.18.0"],
extras_require={
"testing": [
"coverage",
Expand Down
15 changes: 0 additions & 15 deletions tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def test_conditional_assets(app, docname, check_asset_links):
@pytest.mark.noautobuild
@pytest.mark.parametrize("docname", ["index", "no_tabs1", "no_tabs2"])
@pytest.mark.sphinx(testroot="conditionalassets-policy")
@pytest.mark.skipif(
sphinx.version_info[:2] < (4, 1),
reason="Test uses option that was introduced in Sphinx 4.1 ",
)
def test_conditional_assets_html_assets_policy(
app,
docname,
Expand All @@ -56,21 +52,10 @@ def test_conditional_assets_html_assets_policy(


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


@pytest.mark.sphinx(testroot="linenos")
@pytest.mark.skipif(
sphinx.version_info[:2] < (4, 0), reason="Test uses Sphinx 4 code blocks"
)
def test_other_with_assets_new_style(app, check_asset_links):
check_asset_links(app)


@pytest.mark.sphinx(testroot="nestedmarkup")
def test_nested_markup(app, check_asset_links):
check_asset_links(app)
Expand Down
11 changes: 0 additions & 11 deletions tests/test_build/test_other_with_assets.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@
</div>
<div aria-labelledby="tab-0-Qysr" class="sphinx-tabs-panel code-tab group-tab" id="panel-0-Qysr" name="Qysr" role="tabpanel" tabindex="0">
<div class="highlight-c++ notranslate">
<table class="highlighttable">
<tr>
<td class="linenos">
<div class="linenodiv">
<pre><span class="normal">1</span></pre>
</div>
</td>
<td class="code">
</td>
</tr>
</table>
</div>
</div>
<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">
Expand Down
24 changes: 0 additions & 24 deletions tests/test_build/test_other_with_assets_new_style.html

This file was deleted.

13 changes: 0 additions & 13 deletions tests/test_build/test_other_with_assets_new_style.xml

This file was deleted.