azure pipelines ci on 1.0.x branch

This commit is contained in:
David Lord 2019-05-16 13:53:49 -07:00
parent ded0f68c16
commit 84f8e1634f
No known key found for this signature in database
GPG Key ID: 7A1C87E3F5BC42A8
6 changed files with 115 additions and 101 deletions

View File

@ -1,26 +0,0 @@
environment:
global:
TOXENV: py,codecov
matrix:
- PYTHON: C:\Python37-x64
- PYTHON: C:\Python27-x64
init:
- SET PATH=%PYTHON%;%PATH%
install:
- python -m pip install -U tox
build: false
test_script:
- python -m tox
branches:
only:
- master
- /^.*-maintenance$/
cache:
- '%LOCALAPPDATA%\pip\Cache'

85
.azure-pipelines.yml Normal file
View File

@ -0,0 +1,85 @@
trigger:
- 'master'
- '*.x'
jobs:
- job: Flask
variables:
vmImage: ubuntu-latest
python.version: '3.7'
python.architecture: 'x64'
TOXENV: 'py,coverage-ci'
publish.test.results: 'true'
CODECOV_TOKEN: '$(codecov.token)'
strategy:
matrix:
Python37Linux:
python.version: '3.7'
Python37Windows:
python.version: '3.7'
vmImage: 'windows-latest'
Python37Mac:
python.version: '3.7'
vmImage: 'macos-latest'
Pypy3Linux:
python.version: 'pypy3'
Python36Linux:
python.version: '3.6'
Python35Linux:
python.version: '3.5'
Python27Linux:
python.version: '2.7'
Python27Windows:
python.version: '2.7'
vmImage: 'windows-latest'
DocsHtml:
TOXENV: 'docs-html'
publish.test.results: 'false'
VersionRange:
TOXENV: 'devel,lowest,coverage-ci'
pool:
vmImage: $[ variables.vmImage ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python.version)
architecture: $(python.architecture)
displayName: Use Python $(python.version)
- script: pip --disable-pip-version-check install -U tox
displayName: Install tox
- script: tox -- --junitxml=test-results.xml tests examples
displayName: Run tox
- task: PublishTestResults@2
inputs:
testResultsFiles: test-results.xml
testRunTitle: $(Agent.JobName)
condition: eq(variables['publish.test.results'], 'true')
displayName: Publish test results
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage.xml
condition: eq(variables['publish.test.results'], 'true')
displayName: Publish coverage results
# Test on the nightly version of Python.
# Use a container since Azure Pipelines may not have the latest build.
- job: FlaskOnNightly
pool:
vmImage: ubuntu-latest
container: python:rc-stretch
steps:
- script: |
echo "##vso[task.prependPath]$HOME/.local/bin"
pip --disable-pip-version-check install --user -U tox
displayName: Install tox
- script: tox -e nightly
displayName: Run tox

View File

@ -1,57 +0,0 @@
os: linux
dist: xenial
language: python
python:
- "3.7"
- "3.6"
- "3.5"
- "3.4"
- "2.7"
- nightly
- pypy3.5-6.0
env: TOXENV=py,codecov
matrix:
include:
- env: TOXENV=docs-html
- env: TOXENV=devel,lowest,codecov
# disabled because before_install is too slow
# - os: osx
# language: generic
# env: TOXENV=py3,codecov
# cache:
# directories:
# - $HOME/Library/Caches/Homebrew
# - $HOME/Library/Caches/pip
allow_failures:
- python: nightly
- python: pypy3.5-6.0
- os: osx
fast_finish: true
before_install:
- |
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew upgrade python
export PATH="/usr/local/opt/python/libexec/bin:${PATH}"
fi
install:
- pip install tox
script:
- tox
cache:
directories:
- $HOME/.cache/pip
- $HOME/.cache/pre-commit
branches:
only:
- master
- /^\d+(\.\d+)*-maintenance$/
- /^\d+(\.\d+)*(\.x)?$/
notifications:
email: false

View File

@ -10,8 +10,10 @@ Please, don't use the issue tracker for this. Use one of the following
resources for questions about your own code:
* The ``#get-help`` channel on our Discord chat: https://discord.gg/t6rrQZH
* The IRC channel ``#pocoo`` on FreeNode is linked to Discord, but
Discord is preferred.
* The mailing list flask@python.org for long term discussion or larger issues.
* Ask on `Stack Overflow`_. Search with Google first using:
``site:stackoverflow.com flask {search term, exception message, etc.}``

View File

@ -63,11 +63,7 @@ Links
* Releases: https://pypi.org/project/Flask/
* Code: https://github.com/pallets/flask
* Issue tracker: https://github.com/pallets/flask/issues
* Test status:
* Linux, Mac: https://travis-ci.org/pallets/flask
* Windows: https://ci.appveyor.com/project/pallets/flask
* Test status: https://dev.azure.com/pallets/pallets/_build?definitionId=2
* Test coverage: https://codecov.io/gh/pallets/flask
* Official chat: https://discord.gg/t6rrQZH

40
tox.ini
View File

@ -1,16 +1,14 @@
[tox]
envlist =
py{37,36,35,34,27,py}
py{37,27,py}-simplejson
py{37,27,py}-devel
py{37,27,py}-lowest
py{37,36,35,27,py3,py}
py37-{simplejson,devel,lowest}
docs-html
coverage-report
coverage
[testenv]
passenv = LANG
deps =
pytest>=3
pytest
coverage
greenlet
blinker
@ -35,26 +33,42 @@ commands =
pip install -q -e examples/javascript[test]
# pytest-cov doesn't seem to play nice with -p
coverage run -p -m pytest tests examples
coverage run -p -m pytest --tb=short {posargs:tests examples}
[testenv:nightly]
# courtesy Python nightly test, don't fail the build in CI
ignore_outcome = true
commands =
pip install -q -e examples/tutorial[test]
pip install -q -e examples/javascript[test]
coverage run -p -m pytest --tb=short --junitxml=test-results.xml {posargs:tests examples}
[testenv:stylecheck]
deps = pre-commit
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure
[testenv:docs-html]
deps =
-r docs/requirements.txt
commands = sphinx-build -W -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_* APPVEYOR APPVEYOR_*
deps = codecov
[testenv:coverage-ci]
passenv = CODECOV_TOKEN
deps =
coverage
codecov
skip_install = true
commands =
coverage combine
coverage report
codecov
coverage xml
coverage report