language: python
sudo: false
cache: pip
dist: xenial

install:
  - pip install --upgrade pip
  - pip install --upgrade --pre -r test-requirements.txt .
  - pip freeze
env:
  OAUTH2_TOKEN_URL="token_url"
  OAUTH2_USERDATA_URL="userdata_url"
script:
  - |
    if [[ "$TEST_LINT" = 1 ]]; then
      flake8 oauthenticator
    else
      py.test --cov oauthenticator oauthenticator
    fi
after_success:
  - codecov

jobs:
  allow_failures:
    - python: nightly
  fast_finish: true
  include:
    # Default stage: test
    - python: 3.7
      env: TEST_LINT=1
    - python: 3.7
    - python: 3.6
    - python: 3.5
    - python: nightly
    # Only deploy if all test jobs passed
    - stage: deploy
      python: 3.7
      if: tag IS present
      deploy:
        provider: pypi
        user: __token__
        # password: see secret PYPI_PASSWORD variable
        distributions: sdist bdist_wheel

language: python
sudo: false
cache: pip
dist: xenial

install:
  - pip install --upgrade pip
  - pip install --upgrade --pre -r test-requirements.txt .
  - pip freeze
env:
  OAUTH2_TOKEN_URL="token_url"
  OAUTH2_USERDATA_URL="userdata_url"
script:
  - |
    if [[ "$TEST_LINT" = 1 ]]; then
      flake8 oauthenticator
    else
      py.test --cov oauthenticator oauthenticator
    fi
after_success:
  - codecov

jobs:
  allow_failures:
    - python: nightly
  fast_finish: true
  include:
    # Default stage: test
    - python: 3.8
      env: TEST_LINT=1
    - python: 3.8
    - python: 3.7
    - python: 3.6
    - python: 3.5
    - python: nightly
    # Only deploy if all test jobs passed
    - stage: deploy
      python: 3.7
      if: tag IS present
      deploy:
        provider: pypi
        user: __token__
        # password: see secret PYPI_PASSWORD variable
        distributions: sdist bdist_wheel

Add py3.8 for CI testing
Add py3.8 for CI testing
