mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Split out coverage
This commit is contained in:
parent
00a0e13292
commit
65ae948eca
37
.github/workflows/main.yml
vendored
37
.github/workflows/main.yml
vendored
@ -18,13 +18,10 @@ jobs:
|
|||||||
docutils: du16
|
docutils: du16
|
||||||
- python: "3.9"
|
- python: "3.9"
|
||||||
docutils: du17
|
docutils: du17
|
||||||
coverage: "--cov ./ --cov-append --cov-config setup.cfg"
|
|
||||||
- python: "3.10"
|
- python: "3.10"
|
||||||
docutils: du18
|
docutils: du18
|
||||||
- python: "3.11-dev"
|
- python: "3.11-dev"
|
||||||
docutils: py311
|
docutils: py311
|
||||||
env:
|
|
||||||
PYTEST_ADDOPTS: ${{ matrix.coverage }}
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -43,12 +40,9 @@ jobs:
|
|||||||
- name: Install graphviz
|
- name: Install graphviz
|
||||||
run: sudo apt-get install graphviz
|
run: sudo apt-get install graphviz
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: python -m pip install -U pip tox codecov
|
run: python -m pip install -U pip tox
|
||||||
- name: Run Tox
|
- name: Run Tox
|
||||||
run: tox -e ${{ matrix.docutils }} -- -vv
|
run: tox -e ${{ matrix.docutils }} -- -vv
|
||||||
- name: codecov
|
|
||||||
uses: codecov/codecov-action@v1
|
|
||||||
if: matrix.coverage
|
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
@ -62,3 +56,32 @@ jobs:
|
|||||||
run: python -m pip install -U pip tox
|
run: python -m pip install -U pip tox
|
||||||
- name: Run Tox
|
- name: Run Tox
|
||||||
run: tox -e py -- -vv
|
run: tox -e py -- -vv
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
# only run on pushes to branches in the sphinx-doc/sphinx repo
|
||||||
|
if: github.repository_owner == 'sphinx-doc' && github.event_name == 'push'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
PYTEST_ADDOPTS: "--cov ./ --cov-append --cov-config setup.cfg"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up Python 3
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: 3
|
||||||
|
|
||||||
|
- name: Check Python version
|
||||||
|
run: python --version
|
||||||
|
|
||||||
|
- name: Install graphviz
|
||||||
|
run: sudo apt-get install graphviz
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: python -m pip install -U tox pip codecov pytest-cov
|
||||||
|
|
||||||
|
- name: Run Tox
|
||||||
|
run: tox -e py -- -vv
|
||||||
|
|
||||||
|
- name: codecov
|
||||||
|
uses: codecov/codecov-action@v3
|
||||||
|
3
setup.py
3
setup.py
@ -47,8 +47,7 @@ extras_require = {
|
|||||||
"types-requests",
|
"types-requests",
|
||||||
],
|
],
|
||||||
'test': [
|
'test': [
|
||||||
'pytest',
|
'pytest>=4.6',
|
||||||
'pytest-cov',
|
|
||||||
'html5lib',
|
'html5lib',
|
||||||
"typed_ast; python_version < '3.8'",
|
"typed_ast; python_version < '3.8'",
|
||||||
'cython',
|
'cython',
|
||||||
|
12
tox.ini
12
tox.ini
@ -1,6 +1,6 @@
|
|||||||
[tox]
|
[tox]
|
||||||
minversion = 2.4.0
|
minversion = 2.4.0
|
||||||
envlist = docs,flake8,mypy,twine,coverage,py{36,37,38,39,310},du{14,15,16,17,18}
|
envlist = docs,flake8,mypy,twine,py{36,37,38,39,310},du{14,15,16,17,18}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
@ -58,16 +58,6 @@ extras =
|
|||||||
commands =
|
commands =
|
||||||
isort --check-only --diff .
|
isort --check-only --diff .
|
||||||
|
|
||||||
[testenv:coverage]
|
|
||||||
basepython = python3
|
|
||||||
description =
|
|
||||||
Run code coverage checks.
|
|
||||||
setenv =
|
|
||||||
PYTEST_ADDOPTS = --cov sphinx --cov-config "{toxinidir}/setup.cfg"
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
coverage report
|
|
||||||
|
|
||||||
[testenv:mypy]
|
[testenv:mypy]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
description =
|
description =
|
||||||
|
Loading…
Reference in New Issue
Block a user