diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 2551a9d9..00000000 --- a/.appveyor.yml +++ /dev/null @@ -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' diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index e9af4301..9f7dcc20 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -1,82 +1,85 @@ -trigger: -- 'master' -- '*.x' - -jobs: -- job: Flask - variables: - vmImage: ubuntu-latest - python.version: '3.7' - python.architecture: 'x64' - TOXENV: 'py,codecov' - publish.test.results: 'true' - - 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,codecov' - - pool: - vmImage: $[ variables.vmImage ] - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: $(python.version) - architecture: $(python.architecture) - displayName: 'Use Python $(python.version)' - - - script: pip install -U tox - displayName: 'Install tox' - - - script: tox - 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' - - # TODO: add codecov token - -# As a courtesy, try this on the dev version of Python -# Use a container since Azure Pipelines may not have the bleeding-edge Python RC -- job: FlaskOnLatest - pool: - vmImage: ubuntu-latest - container: python:rc-stretch - variables: - TOXENV: 'future' - steps: - - script: | - echo "##vso[task.prependPath]$HOME/.local/bin" - pip install -U --user tox - displayName: 'Install tox' - - # don't fail the build if this doesn't work! - - script: tox - displayName: 'Run tox' +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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 097c9af6..00000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.rst b/README.rst index 2991a836..b834952b 100644 --- a/README.rst +++ b/README.rst @@ -73,7 +73,6 @@ Links * Code: https://github.com/pallets/flask * Issue tracker: https://github.com/pallets/flask/issues * 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 diff --git a/tox.ini b/tox.ini index 5110c152..618a6ff7 100644 --- a/tox.ini +++ b/tox.ini @@ -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,9 +33,9 @@ commands = pip install -q -e examples/javascript[test] # 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 ignore_outcome = true commands = @@ -55,19 +53,22 @@ 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_* BUILD_* SYSTEM_* AGENT_* TF_BUILD -deps = codecov +[testenv:coverage-ci] +passenv = CODECOV_TOKEN +deps = + coverage + codecov skip_install = true commands = coverage combine - coverage report codecov + coverage xml + coverage report