variables:
vmImage: ubuntu-latest
python.version: '3.8'
- TOXENV: py,coverage-ci
+ TOXENV: py
hasTestResults: 'true'
strategy:
python.version: '3.5'
Python 2.7 Linux:
python.version: '2.7'
- Python 2.7 Windows:
- python.version: '2.7'
- vmImage: windows-latest
Docs:
TOXENV: docs
hasTestResults: 'false'
- script: pip --disable-pip-version-check install -U tox
displayName: Install tox
- - script: tox -s false -- --junit-xml=test-results.xml
+ - script: tox
displayName: Run tox
-
- - task: PublishTestResults@2
- inputs:
- testResultsFiles: test-results.xml
- testRunTitle: $(Agent.JobName)
- condition: eq(variables['hasTestResults'], 'true')
- displayName: Publish test results
-
- - task: PublishCodeCoverageResults@1
- inputs:
- codeCoverageTool: Cobertura
- summaryFileLocation: coverage.xml
- condition: eq(variables['hasTestResults'], 'true')
- displayName: Publish coverage results
-include CHANGES.rst tox.ini
+include CHANGES.rst
+include tox.ini
graft artwork
graft docs
prune docs/_build
graft examples
graft ext
graft tests
+global-exclude *.pyc
[metadata]
license_file = LICENSE.rst
+long_description_content_type = text/x-rst
[bdist_wheel]
universal = true
[coverage:paths]
source =
- src/jinja2
- .tox/*/lib/python*/site-packages/jinja2
- .tox/*/site-packages/jinja2
+ src
+ */site-packages
[flake8]
# B = bugbear
py{38,37,36,35,27,py3,py}
style
docs
- coverage
skip_missing_interpreters = true
[testenv]
deps =
- coverage
pytest
-commands = coverage run -p -m pytest --tb=short --basetemp={envtmpdir} {posargs}
+commands = pytest --tb=short --basetemp={envtmpdir} {posargs}
[testenv:style]
deps = pre-commit
[testenv:docs]
deps = -r docs/requirements.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
-
-[testenv:coverage]
-deps = coverage
-skip_install = true
-commands =
- coverage combine
- coverage html
- coverage report
-
-[testenv:coverage-ci]
-deps = coverage
-skip_install = true
-commands =
- coverage combine
- # Ignoring errors because 2.7.15 and 3.5.5 on Azure can't parse async files.
- coverage xml --ignore-errors