diff options
author | David Lord <davidism@gmail.com> | 2019-07-20 12:44:26 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2019-07-20 12:44:26 -0700 |
commit | d04d9998d325db0e54d1cfa037542a30a6c8bcd6 (patch) | |
tree | d078929a24529646b41b64aded06b3fdec56b976 | |
parent | 0f5f2010bb10bb10a7f8ac93d0ba68294f07c413 (diff) | |
download | jinja-d04d9998d325db0e54d1cfa037542a30a6c8bcd6.tar.gz |
switch tests to azure pipelines
-rw-r--r-- | .azure-pipelines.yml | 61 | ||||
-rw-r--r-- | .coveragerc | 11 | ||||
-rw-r--r-- | .travis.yml | 46 | ||||
-rw-r--r-- | Makefile | 21 | ||||
-rw-r--r-- | setup.cfg | 19 | ||||
-rw-r--r-- | tox.ini | 37 |
6 files changed, 91 insertions, 104 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 00000000..48eb1503 --- /dev/null +++ b/.azure-pipelines.yml @@ -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 diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 7cfb347d..00000000 --- a/.coveragerc +++ /dev/null @@ -1,11 +0,0 @@ -[run] -branch = True -source = - jinja2 - tests - -[paths] -source = - jinja2 - .tox/*/lib/python*/site-packages/jinja2 - .tox/pypy/site-packages/jinja2 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a0962237..00000000 --- a/.travis.yml +++ /dev/null @@ -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
\ No newline at end of file diff --git a/Makefile b/Makefile deleted file mode 100644 index 3c12a8c9..00000000 --- a/Makefile +++ /dev/null @@ -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 @@ -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 @@ -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 - -[testenv:docs-linkcheck] -deps = sphinx -commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck +deps = + Sphinx + Pallets-Sphinx-Themes + sphinx-issues +commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html -[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 |