]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
switch tests to azure pipelines
authorDavid Lord <davidism@gmail.com>
Sat, 20 Jul 2019 19:44:26 +0000 (12:44 -0700)
committerDavid Lord <davidism@gmail.com>
Sat, 20 Jul 2019 19:44:26 +0000 (12:44 -0700)
.azure-pipelines.yml [new file with mode: 0644]
.coveragerc [deleted file]
.travis.yml [deleted file]
Makefile [deleted file]
setup.cfg
tox.ini

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
new file mode 100644 (file)
index 0000000..48eb150
--- /dev/null
@@ -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 (file)
index 7cfb347..0000000
+++ /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 (file)
index a096223..0000000
+++ /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 (file)
index 3c12a8c..0000000
--- 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
index e9fc0a44c57252d08e74ccf95d07854f4a6f5099..1c42ef739e872b49dfbc452bdf9e6daa2f0415d7 100644 (file)
--- 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 406eaebac303d695999f2dfcf4258839beca8656..fcabc6b1bb2cba988673f66309b859f202860d0c 100644 (file)
--- 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