mirror of
https://gitee.com/openharmony/third_party_jinja2
synced 2024-11-27 17:30:54 +00:00
switch tests to azure pipelines
This commit is contained in:
parent
0f5f2010bb
commit
d04d9998d3
61
.azure-pipelines.yml
Normal file
61
.azure-pipelines.yml
Normal file
@ -0,0 +1,61 @@
|
||||
trigger:
|
||||
- master
|
||||
- '*.x'
|
||||
|
||||
variables:
|
||||
vmImage: ubuntu-latest
|
||||
python.version: 3.7
|
||||
TOXENV: py,coverage-ci
|
||||
hasTestResults: true
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
Python 3.7 Linux:
|
||||
vmImage: ubuntu-latest
|
||||
Python 3.7 Windows:
|
||||
vmImage: windows-latest
|
||||
Python 3.7 Mac:
|
||||
vmImage: macos-latest
|
||||
PyPy 3 Linux:
|
||||
python.version: pypy3
|
||||
Python 3.6 Linux:
|
||||
python.version: 3.6
|
||||
Python 3.5 Linux:
|
||||
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-html
|
||||
hasTestResults: false
|
||||
|
||||
pool:
|
||||
vmImage: $[ variables.vmImage ]
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
versionSpec: $(python.version)
|
||||
displayName: Use Python $(python.version)
|
||||
|
||||
- script: pip --disable-pip-version-check install -U tox
|
||||
displayName: Install tox
|
||||
|
||||
- script: tox -s false -- --junit-xml=test-results.xml
|
||||
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
|
11
.coveragerc
11
.coveragerc
@ -1,11 +0,0 @@
|
||||
[run]
|
||||
branch = True
|
||||
source =
|
||||
jinja2
|
||||
tests
|
||||
|
||||
[paths]
|
||||
source =
|
||||
jinja2
|
||||
.tox/*/lib/python*/site-packages/jinja2
|
||||
.tox/pypy/site-packages/jinja2
|
46
.travis.yml
46
.travis.yml
@ -1,46 +0,0 @@
|
||||
dist: xenial
|
||||
sudo: false
|
||||
language: python
|
||||
|
||||
python:
|
||||
- 3.7
|
||||
- 3.6
|
||||
- 3.5
|
||||
- 3.4
|
||||
- 2.7
|
||||
- pypy3.5-6.0
|
||||
- pypy2.7-6.0
|
||||
|
||||
env:
|
||||
- TOXENV=py,codecov
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: nightly
|
||||
env: TOXENV=py
|
||||
- python: 3.6
|
||||
env: TOXENV=docs-html
|
||||
|
||||
install:
|
||||
- pip install tox
|
||||
|
||||
script:
|
||||
- tox
|
||||
|
||||
cache:
|
||||
- pip
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^\d+(\.\d+)*(\.x)?$/
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#pocoo"
|
||||
on_success: change
|
||||
on_failure: always
|
||||
use_notice: true
|
||||
skip_join: true
|
21
Makefile
21
Makefile
@ -1,21 +0,0 @@
|
||||
test:
|
||||
py.test tests --tb=short
|
||||
|
||||
develop:
|
||||
pip install --editable .
|
||||
|
||||
tox-test:
|
||||
@tox
|
||||
|
||||
release:
|
||||
python scripts/make-release.py
|
||||
|
||||
upload-docs:
|
||||
$(MAKE) -C docs html dirhtml latex
|
||||
$(MAKE) -C docs/_build/latex all-pdf
|
||||
cd docs/_build/; mv html jinja-docs; zip -r jinja-docs.zip jinja-docs; mv jinja-docs html
|
||||
scp -r docs/_build/dirhtml/* flow.srv.pocoo.org:/srv/websites/jinja.pocoo.org/docs/
|
||||
scp -r docs/_build/latex/Jinja2.pdf flow.srv.pocoo.org:/srv/websites/jinja.pocoo.org/docs/jinja-docs.pdf
|
||||
scp -r docs/_build/jinja-docs.zip flow.srv.pocoo.org:/srv/websites/jinja.pocoo.org/docs/
|
||||
|
||||
.PHONY: test
|
19
setup.cfg
19
setup.cfg
@ -1,9 +1,20 @@
|
||||
[bdist_wheel]
|
||||
universal = 1
|
||||
|
||||
[metadata]
|
||||
license_file = LICENSE
|
||||
|
||||
[bdist_wheel]
|
||||
universal = true
|
||||
|
||||
[tool:pytest]
|
||||
minversion = 3.0
|
||||
testpaths = tests
|
||||
|
||||
[coverage:run]
|
||||
branch = True
|
||||
source =
|
||||
jinja2
|
||||
tests
|
||||
|
||||
[coverage:paths]
|
||||
source =
|
||||
src/jinja2
|
||||
.tox/*/lib/python*/site-packages/jinja2
|
||||
.tox/*/site-packages/jinja2
|
||||
|
37
tox.ini
37
tox.ini
@ -1,41 +1,34 @@
|
||||
[tox]
|
||||
envlist =
|
||||
py{36,35,34,33,27,26,py}
|
||||
py{37,36,35,27,py3,py}
|
||||
docs-html
|
||||
coverage-report
|
||||
coverage
|
||||
skip_missing_interpreters = true
|
||||
|
||||
[testenv]
|
||||
passenv = LANG
|
||||
usedevelop = true
|
||||
deps =
|
||||
pytest>=3
|
||||
coverage
|
||||
|
||||
commands = coverage run -p -m pytest {posargs}
|
||||
pytest
|
||||
commands = coverage run -p -m pytest --tb=short --basetemp={envtmpdir} {posargs}
|
||||
|
||||
[testenv:docs-html]
|
||||
deps = sphinx
|
||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
|
||||
deps =
|
||||
Sphinx
|
||||
Pallets-Sphinx-Themes
|
||||
sphinx-issues
|
||||
commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
||||
|
||||
[testenv:docs-linkcheck]
|
||||
deps = sphinx
|
||||
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
|
||||
|
||||
[testenv:coverage-report]
|
||||
[testenv:coverage]
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands =
|
||||
coverage combine
|
||||
coverage report
|
||||
coverage html
|
||||
coverage report
|
||||
|
||||
[testenv:codecov]
|
||||
passenv = CI TRAVIS TRAVIS_*
|
||||
deps = codecov
|
||||
[testenv:coverage-ci]
|
||||
deps = coverage
|
||||
skip_install = true
|
||||
commands =
|
||||
# install argparse for 2.6
|
||||
python -c 'import sys, pip; sys.version_info < (2, 7) and pip.main(["install", "argparse", "-q"])'
|
||||
coverage combine
|
||||
coverage report
|
||||
codecov
|
||||
coverage xml
|
||||
|
Loading…
Reference in New Issue
Block a user