Codebase list cherrypy3 / debian/latest .travis.yml
debian/latest

Tree @debian/latest (Download .tar.gz)

.travis.yml @debian/latestraw · history · blame

conditions: v1

language: python
os: linux
dist: focal
services:
- memcached
_base_envs:
- &stage_lint
  stage: &stage_lint_name lint
- &stage_test
  stage: &stage_test_name test
- &stage_test_priority
  stage: &stage_test_priority_name test against latest Python versions first (under GNU/Linux)
- &stage_test_osx
  stage: &stage_test_osx_name test under OS X (last chance to fail before deploy available)
- &stage_deploy
  stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits)
- _conditions:
  - &condition_api_or_cron
    if: type IN (api, cron)
- &no_memcached
  services: []
- &pyenv_base
  <<: *stage_test
  language: generic
  env:
  - &env_pyenv PYENV_ROOT="$HOME/.pyenv"
  - &env_path PATH="$PYENV_ROOT/bin:$PATH"
  before_install:
  - &ensure_pyenv_installed |
    if [ ! -f "$PYENV_ROOT/bin/pyenv" ]
    then
      rm -rf "$PYENV_ROOT"
      curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
    fi
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    pyenv update
  - &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
  - &switch_python pyenv shell "$PYTHON_VERSION"
  - &python_version python --version
- &osx_python_base
  <<: *pyenv_base
  <<: *stage_test_osx
  os: osx
  language: generic
  before_install:
  - brew update
  - brew install pyenv || brew upgrade pyenv
  - &ensure_pyenv_preloaded |
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
  - *install_python
  - *switch_python
  - *python_version
  before_cache:
  - brew --cache
  script:
  - travis_retry python -m tox
- &python_3_9_mixture
  python: &mainstream_python 3.9
  group:
- &pure_python_base
  <<: *stage_test
  <<: *python_3_9_mixture
- &pure_python_base_priority
  <<: *pure_python_base
  <<: *stage_test_priority
- &lint_python_base
  <<: *stage_lint
  <<: *no_memcached
  python: 3.9
  after_failure: skip
python:
- 3.7-dev
jobs:
  fast_finish: true
  include:
  - <<: *lint_python_base
    env: TOXENV=pre-commit
  - <<: *lint_python_base
    env: TOXENV=pre-commit-pep257
  - <<: *lint_python_base
    env: TOXENV=dist-check
  - <<: *lint_python_base
    env: TOXENV=setup-check
  - <<: *lint_python_base
    name: >-
      Ensure that docs get built
      (non-strict until \#1797 get fixed)
    env: TOXENV=build-docs
  - <<: *pure_python_base_priority
    # mainstream Python here
  - <<: *pure_python_base_priority
    # mainstream Python here
    # run tests against the bleeding-edge cheroot
    env: TOXENV=cheroot-master
  - <<: *pure_python_base_priority
    python: nightly
  - <<: *osx_python_base
    python: *mainstream_python
    env:
    - PYTHON_VERSION=3.6.5
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    python: 3.7-dev
    env:
    - PYTHON_VERSION=3.7-dev
    - *env_pyenv
    - *env_path
  - <<: *osx_python_base
    # mainstream Python here
    python: *mainstream_python
    env:
    - PYTHON_VERSION=3.7.0
    # run tests against the bleeding-edge cheroot
    - TOXENV=cheroot-master
    - *env_pyenv
    - *env_path
  - <<: *stage_deploy
    <<: *python_3_9_mixture
    <<: *no_memcached
    install: skip
    script: skip
    deploy:
      provider: pypi
      skip_cleanup: true
      on:
        tags: true
        all_branches: true
        python: *mainstream_python
      user: __token__
      distributions: dists
      password:
        secure: r9jZVhWnwBpbQwkoAQnhcQajV6Hk8WKs53+P20YrNfLSrSfODmJFyljCLsUJH7TnmAdrnQfV19PXPfVXPucK2ZEg2E91/5z6pgADi01NX3QMr7vEpffk6ix0uHBSa3VMBF+VlmhCzAFnNIN0E7M4kjoc5Cr7qBWPwZpqd715axYxBKSIH4Cmt2cyW3ozMftNtbI+ujs+kJTX6m/2UAL8yngau0TWR5bUBaywTZdkfPIKxt2XDfTW5PuOTRgS6QSU+/Va+M1IJhFPthjmTO+t8U/qonSLA34nLkT7vJmME0lyQF0lr+IV41IKxEFz29hmzLY1dyZI5+bs3vEhxU1xGqwr1Hnif6f14TzeiubQrCxt1UP9D3HXguCNI4gGeny1OPJNNt5ezJDNha2HlIy2quLKgtW38TS0PPm7PDqgYhjidZyRXZ8G6A/DAwh00amCNkSN6lG7Lryd1QB44mYHCKm8XdLfBT94EqzSdgQyyoUAA87A8zB5zpHiRD2DGwrTxHkGQo7TTSVr82cYwkRW0nqE6bZkfNTrGLULB8872ZFGpbSbrAft5mDlSnprLRwrEA0SsFUd4O2W64pcvcJENa/NY+vvXAyd9jaHb5v0RpxUyllLrAIFuLEFHeHwyBAlMgq54dtYWqYa8pyJNoUiwOt158qzOE6wnoburP4KA9c=
cache:
  pip: true
  directories:
  - $HOME/.cache/pre-commit
  - $HOME/Library/Caches/Homebrew
install:
- python -m pip install tox "setuptools>=28.2"
- python -m tox --notest  # Pre-populate a virtualenv with dependencies
script:
- python -m tox
after_failure:
- echo "Here's a list of installed Python packages:"
- pip list --format=columns
- echo Dumping logs, because tests failed to succeed
- |
    for log in `ls cherrypy/test/*.log`
    do
      echo Outputting $log
      cat $log
    done
- py_log=/home/travis/build/cherrypy/cherrypy/.tox/python/log/python-0.log
- echo Outputting python invocation log from $py_log
- cat $py_log
stages:
- *stage_lint_name
- *stage_test_priority_name
- name: *stage_test_name
  <<: *condition_api_or_cron
- name: *stage_test_osx_name
  <<: *condition_api_or_cron
- name: *stage_deploy_name
  if: tag IS present