Skip to content

Commit e067927

Browse files
committed
2 parents d5399ef + b02bf32 commit e067927

File tree

3 files changed

+32
-48
lines changed

3 files changed

+32
-48
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,17 @@ permissions:
66
contents: read
77

88
env:
9-
# Environment variables to support color support (jaraco/skeleton#66):
10-
# Request colored output from CLI tools supporting it. Different tools
11-
# interpret the value differently. For some, just being set is sufficient.
12-
# For others, it must be a non-zero integer. For yet others, being set
13-
# to a non-empty value is sufficient. For tox, it must be one of
14-
# <blank>, 0, 1, false, no, off, on, true, yes. The only enabling value
15-
# in common is "1".
9+
# Environment variable to support color support (jaraco/skeleton#66)
1610
FORCE_COLOR: 1
17-
# MyPy's color enforcement (must be a non-zero number)
18-
MYPY_FORCE_COLOR: -42
19-
# Recognized by the `py` package, dependency of `pytest` (must be "1")
20-
PY_COLORS: 1
21-
# Make tox-wrapped tools see color requests
22-
TOX_TESTENV_PASSENV: >-
23-
FORCE_COLOR
24-
MYPY_FORCE_COLOR
25-
NO_COLOR
26-
PY_COLORS
27-
PYTEST_THEME
28-
PYTEST_THEME_MODE
2911

3012
# Suppress noisy pip warnings
3113
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
3214
PIP_NO_PYTHON_VERSION_WARNING: 'true'
3315
PIP_NO_WARN_SCRIPT_LOCATION: 'true'
3416

35-
# Disable the spinner, noise in GHA; TODO(webknjaz): Fix this upstream
36-
# Must be "1".
37-
TOX_PARALLEL_NO_SPINNER: 1
17+
# Ensure tests can sense settings about the environment
18+
TOX_OVERRIDE: >-
19+
testenv.pass_env+=GITHUB_*
3820
3921
4022
jobs:
@@ -71,6 +53,24 @@ jobs:
7153
- name: Run
7254
run: tox
7355

56+
diffcov:
57+
runs-on: ubuntu-latest
58+
steps:
59+
- uses: actions/checkout@v3
60+
with:
61+
fetch-depth: 0
62+
- name: Setup Python
63+
uses: actions/setup-python@v4
64+
with:
65+
python-version: 3.x
66+
- name: Install tox
67+
run: |
68+
python -m pip install tox
69+
- name: Evaluate coverage
70+
run: tox
71+
env:
72+
TOXENV: diffcov
73+
7474
docs:
7575
runs-on: ubuntu-latest
7676
env:
@@ -100,24 +100,6 @@ jobs:
100100
with:
101101
jobs: ${{ toJSON(needs) }}
102102

103-
diffcov:
104-
runs-on: ubuntu-latest
105-
steps:
106-
- uses: actions/checkout@v2
107-
with:
108-
fetch-depth: 0
109-
- name: Setup Python
110-
uses: actions/setup-python@v2
111-
with:
112-
python-version: 3.9
113-
- name: Install tox
114-
run: |
115-
python -m pip install tox
116-
- name: Evaluate coverage
117-
run: tox
118-
env:
119-
TOXENV: diffcov
120-
121103
release:
122104
permissions:
123105
contents: write

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ testing =
4848
docs =
4949
# upstream
5050
sphinx >= 3.5
51+
# workaround for sphinx/sphinx-doc#11662
52+
sphinx < 7.2.5
5153
jaraco.packaging >= 9.3
5254
rst.linker >= 1.9
5355
furo

tox.ini

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ usedevelop = True
88
extras =
99
testing
1010

11+
[testenv:diffcov]
12+
deps =
13+
diff-cover
14+
commands =
15+
pytest {posargs} --cov-report xml
16+
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
17+
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
18+
1119
[testenv:docs]
1220
extras =
1321
docs
@@ -17,14 +25,6 @@ commands =
1725
python -m sphinx -W --keep-going . {toxinidir}/build/html
1826
python -m sphinxlint
1927

20-
[testenv:diffcov]
21-
deps =
22-
diff-cover
23-
commands =
24-
pytest {posargs} --cov-report xml
25-
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
26-
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
27-
2828
[testenv:finalize]
2929
skip_install = True
3030
deps =

0 commit comments

Comments
 (0)