Skip to content

Commit

Permalink
Merge pull request #3204 from pallets/azure
Browse files Browse the repository at this point in the history
azure pipelines ci on 1.0.x branch
  • Loading branch information
davidism committed May 17, 2019
2 parents ded0f68 + 84f8e16 commit 814a7ea
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 101 deletions.
26 changes: 0 additions & 26 deletions .appveyor.yml

This file was deleted.

85 changes: 85 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.}``
Expand Down
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
40 changes: 27 additions & 13 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 814a7ea

Please sign in to comment.