Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit 9e6e332

Browse files
authored
Merge pull request #155 from readthedocs/humitos/update-test-suite
2 parents ef146e4 + 7932743 commit 9e6e332

File tree

2 files changed

+45
-43
lines changed

2 files changed

+45
-43
lines changed

.circleci/config.yml

+33-34
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,64 @@
11
version: 2.1
22

33
commands:
4-
run-tests:
4+
run-tox:
5+
description: "Run tox"
6+
parameters:
7+
version:
8+
type: string
9+
sphinx-version:
10+
type: string
11+
default: "18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,latest"
512
steps:
613
- checkout
714
- run: pip install --user tox
8-
- run: tox
15+
- run: tox -e "<<parameters.version>>-sphinx{<<parameters.sphinx-version>>}"
916

1017
jobs:
11-
tests-py36:
18+
py36:
1219
docker:
1320
- image: 'cimg/python:3.6'
14-
environment:
15-
# Select only the environments that match the Python version we have
16-
# installed in this Docker image (e.g. `py36-*`). Use TOX_SKIP_ENV with
17-
# a negated regex to only match the environment we want to run. Read
18-
# more at https://github.com/tox-dev/tox/issues/238
19-
TOX_SKIP_ENV: '^(?!py36-)'
2021
steps:
21-
- run-tests
22-
tests-py37:
22+
- run-tox:
23+
version: py36
24+
py37:
2325
docker:
2426
- image: 'cimg/python:3.7'
25-
environment:
26-
TOX_SKIP_ENV: '^(?!py37-)'
2727
steps:
28-
- run-tests
28+
- run-tox:
29+
version: py37
2930

30-
tests-py38:
31+
py38:
3132
docker:
3233
- image: 'cimg/python:3.8'
33-
environment:
34-
TOX_SKIP_ENV: '^(?!py38-)'
3534
steps:
36-
- run-tests
35+
- run-tox:
36+
version: py38
3737

38-
tests-py39:
38+
py39:
3939
docker:
4040
- image: 'cimg/python:3.9'
41-
environment:
42-
TOX_SKIP_ENV: '^(?!py39-)'
4341
steps:
44-
- run-tests
42+
- run-tox:
43+
version: py39
4544

46-
47-
tests-py310:
45+
py310:
4846
docker:
4947
- image: 'cimg/python:3.10'
50-
environment:
51-
# Skip py310-sphinx{35,40,41} because it's broken
52-
# See https://github.com/sphinx-doc/sphinx/issues/9816
53-
TOX_SKIP_ENV: '^(?!py310-)|(^py310-sphinx(35|40|41)$)'
5448
steps:
55-
- run-tests
49+
- run-tox:
50+
version: py310
51+
# Do not run tests for Python 3.10 and some versions of Sphinx because it's broken
52+
# See https://github.com/sphinx-doc/sphinx/issues/9816
53+
sphinx-version: "18,20,21,22,23,24,42,43,latest"
5654

5755
workflows:
5856
version: 2
5957
test:
6058
jobs:
61-
- tests-py36
62-
- tests-py37
63-
- tests-py38
64-
- tests-py39
65-
- tests-py310
59+
- py36
60+
- py37
61+
- py38
62+
- py39
63+
- py310
64+

tox.ini

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
[tox]
22
envlist =
33
docs
4-
py{36,37,38,39,310}-sphinx{18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,latest}
4+
py{36,37,38,39}-sphinx{18,20,21,22,23,24,30,31,32,33,34,35,40,41,42,43,latest}
5+
py{310}-sphinx{18,20,21,22,23,24,42,43,latest}
56

67
[testenv]
78
deps =
@@ -25,14 +26,19 @@ deps =
2526
sphinx41: sphinx~=4.1.0
2627
sphinx42: sphinx~=4.2.0
2728
sphinx43: sphinx~=4.3.0
28-
29-
# Pin docutils<0.18 because it generates issues on these versions
30-
sphinx{18,20,21,22,23,24,25,30,31,32,33,34,35}: docutils<0.18
31-
3229
sphinxlatest: sphinx
30+
3331
commands = pytest {posargs}
3432

35-
[testenv:py38-sphinx43]
33+
# Pin docutils<0.18 for all Python versions using Sphinx 1.x, 2.x, 3.x, 4.0, 4.1
34+
# since it's incompatible and generating lot of errors
35+
# https://tox.wiki/en/latest/config.html#generating-environments-conditional-settings
36+
[testenv:py{36,37,38,39,310}-sphinx{18,20,21,22,23,24,30,31,32,33,34,35,40,41}]
37+
deps =
38+
{[testenv]deps}
39+
docutils<0.18
40+
41+
[testenv:py310-sphinx43]
3642
deps =
3743
{[testenv]deps}
3844
pytest-cov
@@ -43,8 +49,5 @@ deps =
4349
-r {toxinidir}/docs/requirements.txt
4450
.
4551
changedir = {toxinidir}/docs
46-
setenv =
47-
READTHEDOCS_PROJECT = sphinx-hoverxref
48-
READTHEDOCS_VERSION = latest
4952
commands =
5053
sphinx-build -W -E -q -b html -d {envtmpdir}/doctrees . {envtmpdir}/html

0 commit comments

Comments
 (0)