From: David Lord Date: Sat, 20 Jul 2019 19:44:26 +0000 (-0700) Subject: switch tests to azure pipelines X-Git-Tag: 2.10.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d04d9998d325db0e54d1cfa037542a30a6c8bcd6;p=thirdparty%2Fjinja.git switch tests to azure pipelines --- 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 diff --git a/setup.cfg b/setup.cfg index e9fc0a44..1c42ef73 100644 --- a/setup.cfg +++ b/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 diff --git a/tox.ini b/tox.ini index 406eaeba..fcabc6b1 100644 --- a/tox.ini +++ b/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 - -[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