forked from orbit-oss/flask
Merge branch '1.0.x'
This commit is contained in:
commit
953284a8d0
5 changed files with 100 additions and 180 deletions
|
|
@ -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'
|
|
||||||
|
|
@ -1,82 +1,85 @@
|
||||||
trigger:
|
trigger:
|
||||||
- 'master'
|
- 'master'
|
||||||
- '*.x'
|
- '*.x'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Flask
|
- job: Flask
|
||||||
variables:
|
variables:
|
||||||
vmImage: ubuntu-latest
|
vmImage: ubuntu-latest
|
||||||
python.version: '3.7'
|
python.version: '3.7'
|
||||||
python.architecture: 'x64'
|
python.architecture: 'x64'
|
||||||
TOXENV: 'py,codecov'
|
TOXENV: 'py,coverage-ci'
|
||||||
publish.test.results: 'true'
|
publish.test.results: 'true'
|
||||||
|
CODECOV_TOKEN: '$(codecov.token)'
|
||||||
strategy:
|
|
||||||
matrix:
|
strategy:
|
||||||
Python37Linux:
|
matrix:
|
||||||
python.version: '3.7'
|
Python37Linux:
|
||||||
Python37Windows:
|
python.version: '3.7'
|
||||||
python.version: '3.7'
|
Python37Windows:
|
||||||
vmImage: 'windows-latest'
|
python.version: '3.7'
|
||||||
Python37Mac:
|
vmImage: 'windows-latest'
|
||||||
python.version: '3.7'
|
Python37Mac:
|
||||||
vmImage: 'macos-latest'
|
python.version: '3.7'
|
||||||
Pypy3Linux:
|
vmImage: 'macos-latest'
|
||||||
python.version: 'pypy3'
|
Pypy3Linux:
|
||||||
Python36Linux:
|
python.version: 'pypy3'
|
||||||
python.version: '3.6'
|
Python36Linux:
|
||||||
Python35Linux:
|
python.version: '3.6'
|
||||||
python.version: '3.5'
|
Python35Linux:
|
||||||
Python27Linux:
|
python.version: '3.5'
|
||||||
python.version: '2.7'
|
Python27Linux:
|
||||||
Python27Windows:
|
python.version: '2.7'
|
||||||
python.version: '2.7'
|
Python27Windows:
|
||||||
vmImage: 'windows-latest'
|
python.version: '2.7'
|
||||||
DocsHtml:
|
vmImage: 'windows-latest'
|
||||||
TOXENV: 'docs-html'
|
DocsHtml:
|
||||||
publish.test.results: 'false'
|
TOXENV: 'docs-html'
|
||||||
VersionRange:
|
publish.test.results: 'false'
|
||||||
TOXENV: 'devel,lowest,codecov'
|
VersionRange:
|
||||||
|
TOXENV: 'devel,lowest,coverage-ci'
|
||||||
pool:
|
|
||||||
vmImage: $[ variables.vmImage ]
|
pool:
|
||||||
|
vmImage: $[ variables.vmImage ]
|
||||||
steps:
|
|
||||||
- task: UsePythonVersion@0
|
steps:
|
||||||
inputs:
|
- task: UsePythonVersion@0
|
||||||
versionSpec: $(python.version)
|
inputs:
|
||||||
architecture: $(python.architecture)
|
versionSpec: $(python.version)
|
||||||
displayName: 'Use Python $(python.version)'
|
architecture: $(python.architecture)
|
||||||
|
displayName: Use Python $(python.version)
|
||||||
- script: pip install -U tox
|
|
||||||
displayName: 'Install tox'
|
- script: pip --disable-pip-version-check install -U tox
|
||||||
|
displayName: Install tox
|
||||||
- script: tox
|
|
||||||
displayName: 'Run tox'
|
- script: tox -- --junitxml=test-results.xml tests examples
|
||||||
|
displayName: Run tox
|
||||||
- task: PublishTestResults@2
|
|
||||||
inputs:
|
- task: PublishTestResults@2
|
||||||
testResultsFiles: 'test-results.xml'
|
inputs:
|
||||||
testRunTitle: '$(Agent.JobName)'
|
testResultsFiles: test-results.xml
|
||||||
condition: eq(variables['publish.test.results'], 'true')
|
testRunTitle: $(Agent.JobName)
|
||||||
displayName: 'Publish test results'
|
condition: eq(variables['publish.test.results'], 'true')
|
||||||
|
displayName: Publish test results
|
||||||
# TODO: add codecov token
|
|
||||||
|
- task: PublishCodeCoverageResults@1
|
||||||
# As a courtesy, try this on the dev version of Python
|
inputs:
|
||||||
# Use a container since Azure Pipelines may not have the bleeding-edge Python RC
|
codeCoverageTool: Cobertura
|
||||||
- job: FlaskOnLatest
|
summaryFileLocation: coverage.xml
|
||||||
pool:
|
condition: eq(variables['publish.test.results'], 'true')
|
||||||
vmImage: ubuntu-latest
|
displayName: Publish coverage results
|
||||||
container: python:rc-stretch
|
|
||||||
variables:
|
# Test on the nightly version of Python.
|
||||||
TOXENV: 'future'
|
# Use a container since Azure Pipelines may not have the latest build.
|
||||||
steps:
|
- job: FlaskOnNightly
|
||||||
- script: |
|
pool:
|
||||||
echo "##vso[task.prependPath]$HOME/.local/bin"
|
vmImage: ubuntu-latest
|
||||||
pip install -U --user tox
|
container: python:rc-stretch
|
||||||
displayName: 'Install tox'
|
steps:
|
||||||
|
- script: |
|
||||||
# don't fail the build if this doesn't work!
|
echo "##vso[task.prependPath]$HOME/.local/bin"
|
||||||
- script: tox
|
pip --disable-pip-version-check install --user -U tox
|
||||||
displayName: 'Run tox'
|
displayName: Install tox
|
||||||
|
|
||||||
|
- script: tox -e nightly
|
||||||
|
displayName: Run tox
|
||||||
|
|
|
||||||
57
.travis.yml
57
.travis.yml
|
|
@ -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
|
|
||||||
|
|
@ -73,7 +73,6 @@ Links
|
||||||
* Code: https://github.com/pallets/flask
|
* Code: https://github.com/pallets/flask
|
||||||
* Issue tracker: https://github.com/pallets/flask/issues
|
* Issue tracker: https://github.com/pallets/flask/issues
|
||||||
* Test status: https://dev.azure.com/pallets/pallets/_build?definitionId=2
|
* Test status: https://dev.azure.com/pallets/pallets/_build?definitionId=2
|
||||||
|
|
||||||
* Test coverage: https://codecov.io/gh/pallets/flask
|
* Test coverage: https://codecov.io/gh/pallets/flask
|
||||||
* Official chat: https://discord.gg/t6rrQZH
|
* Official chat: https://discord.gg/t6rrQZH
|
||||||
|
|
||||||
|
|
|
||||||
29
tox.ini
29
tox.ini
|
|
@ -1,16 +1,14 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
py{37,36,35,34,27,py}
|
py{37,36,35,27,py3,py}
|
||||||
py{37,27,py}-simplejson
|
py37-{simplejson,devel,lowest}
|
||||||
py{37,27,py}-devel
|
|
||||||
py{37,27,py}-lowest
|
|
||||||
docs-html
|
docs-html
|
||||||
coverage-report
|
coverage
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = LANG
|
passenv = LANG
|
||||||
deps =
|
deps =
|
||||||
pytest>=3
|
pytest
|
||||||
coverage
|
coverage
|
||||||
greenlet
|
greenlet
|
||||||
blinker
|
blinker
|
||||||
|
|
@ -35,9 +33,9 @@ commands =
|
||||||
pip install -q -e examples/javascript[test]
|
pip install -q -e examples/javascript[test]
|
||||||
|
|
||||||
# pytest-cov doesn't seem to play nice with -p
|
# pytest-cov doesn't seem to play nice with -p
|
||||||
coverage run -p -m pytest --tb=short --junitxml=test-results.xml {posargs:tests examples}
|
coverage run -p -m pytest --tb=short {posargs:tests examples}
|
||||||
|
|
||||||
[testenv:future]
|
[testenv:nightly]
|
||||||
# courtesy Python nightly test, don't fail the build in CI
|
# courtesy Python nightly test, don't fail the build in CI
|
||||||
ignore_outcome = true
|
ignore_outcome = true
|
||||||
commands =
|
commands =
|
||||||
|
|
@ -55,19 +53,22 @@ deps =
|
||||||
-r docs/requirements.txt
|
-r docs/requirements.txt
|
||||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
|
||||||
|
|
||||||
[testenv:coverage-report]
|
[testenv:coverage]
|
||||||
deps = coverage
|
deps = coverage
|
||||||
skip_install = true
|
skip_install = true
|
||||||
commands =
|
commands =
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage report
|
|
||||||
coverage html
|
coverage html
|
||||||
|
coverage report
|
||||||
|
|
||||||
[testenv:codecov]
|
[testenv:coverage-ci]
|
||||||
passenv = CI TRAVIS TRAVIS_* APPVEYOR APPVEYOR_* BUILD_* SYSTEM_* AGENT_* TF_BUILD
|
passenv = CODECOV_TOKEN
|
||||||
deps = codecov
|
deps =
|
||||||
|
coverage
|
||||||
|
codecov
|
||||||
skip_install = true
|
skip_install = true
|
||||||
commands =
|
commands =
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage report
|
|
||||||
codecov
|
codecov
|
||||||
|
coverage xml
|
||||||
|
coverage report
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue