Skip to content

Commit b98411e

Browse files
committed
2 parents 8e7b968 + b02bf32 commit b98411e

File tree

3 files changed

+31
-48
lines changed

3 files changed

+31
-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:
@@ -76,6 +58,24 @@ jobs:
7658
- name: Run
7759
run: tox
7860

61+
diffcov:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
with:
66+
fetch-depth: 0
67+
- name: Setup Python
68+
uses: actions/setup-python@v4
69+
with:
70+
python-version: 3.x
71+
- name: Install tox
72+
run: |
73+
python -m pip install tox
74+
- name: Evaluate coverage
75+
run: tox
76+
env:
77+
TOXENV: diffcov
78+
7979
docs:
8080
runs-on: ubuntu-latest
8181
env:
@@ -104,24 +104,6 @@ jobs:
104104
uses: re-actors/alls-green@release/v1
105105
with:
106106
jobs: ${{ toJSON(needs) }}
107-
108-
diffcov:
109-
runs-on: ubuntu-latest
110-
steps:
111-
- uses: actions/checkout@v2
112-
with:
113-
fetch-depth: 0
114-
- name: Setup Python
115-
uses: actions/setup-python@v2
116-
with:
117-
python-version: 3.9
118-
- name: Install tox
119-
run: |
120-
python -m pip install tox
121-
- name: Evaluate coverage
122-
run: tox
123-
env:
124-
TOXENV: diffcov
125107

126108
release:
127109
permissions:

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ testing =
5353
docs =
5454
# upstream
5555
sphinx >= 3.5
56+
# workaround for sphinx/sphinx-doc#11662
57+
sphinx < 7.2.5
5658
jaraco.packaging >= 9.3
5759
rst.linker >= 1.9
5860
furo

tox.ini

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ usedevelop = True
1010
extras =
1111
testing
1212

13+
[testenv:diffcov]
14+
deps =
15+
diff-cover
16+
commands =
17+
pytest {posargs} --cov-report xml
18+
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
19+
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
1320

1421
[testenv:docs]
1522
extras =
@@ -20,14 +27,6 @@ commands =
2027
python -m sphinx -W --keep-going . {toxinidir}/build/html
2128
python -m sphinxlint
2229

23-
[testenv:diffcov]
24-
deps =
25-
diff-cover
26-
commands =
27-
pytest {posargs} --cov-report xml
28-
diff-cover coverage.xml --compare-branch=origin/main --html-report diffcov.html
29-
diff-cover coverage.xml --compare-branch=origin/main --fail-under=100
30-
3130
[testenv:finalize]
3231
skip_install = True
3332
deps =

0 commit comments

Comments
 (0)