language: python
sudo: required
dist: xenial

# install dependencies
install:
  - pip install --upgrade setuptools pip
  - |
    if [[ ! -z "$KUBE_PY" ]]; then
      # install pinned kubernetes
      pip install -e ".[test]" "kubernetes==$KUBE_PY.*"
    else
      # add --pre so that we test with prereleases of dependencies
      # to catch compatibility issues before they enter final releases
      pip install --upgrade --pre -e ".[test]"
    fi
  - source ci/minikube.env
  - ./ci/install-kube.sh
  - pip freeze

# command to run tests
script:
  - pytest --cov kubespawner -v
after_success:
  - pip install codecov
  - codecov

matrix:
  fast_finish: true
  allow_failures:
    - python: nightly
  include:
    - python: nightly
    - python: 3.5
      env: KUBE_PY=7
    - python: 3.6
      env: KUBE_PY=7
    - python: 3.7
      env: KUBE_PY=8

language: python
sudo: required
dist: xenial

# install dependencies
install:
  - pip install --upgrade setuptools pip
  - |
    if [[ ! -z "$KUBE_PY" ]]; then
      # install pinned kubernetes
      pip install -e ".[test]" "kubernetes==$KUBE_PY.*"
    else
      # add --pre so that we test with prereleases of dependencies
      # to catch compatibility issues before they enter final releases
      pip install --upgrade --pre -e ".[test]"
    fi
  - source ci/minikube.env
  - ./ci/install-kube.sh
  - pip freeze

# command to run tests
script:
  - pytest --cov kubespawner -v
after_success:
  - pip install codecov
  - codecov

matrix:
  allow_failures:
    - python: nightly
  fast_finish: true
  include:
    # Test the oldest supported python on
    # the latest supported kubernetes-client,
    # and use the latest supported kubernetes
    # version along for the kubernetes-client.
    - python: 3.8
      env: KUBE_PY=7
      # env: KUBE_PY=7 KUBE_VERSION=1.11.*
    - python: 3.7
      env: KUBE_PY=8
      # env: KUBE_PY=8 KUBE_VERSION=1.12.*
    - python: 3.6
      env: KUBE_PY=9
      # env: KUBE_PY=9 KUBE_VERSION=1.13.*
    - python: 3.5
      env: KUBE_PY=10
      # env: KUBE_PY=10 KUBE_VERSION=1.14.*
    - python: nightly
      env: KUBE_PY=11
      # env: KUBE_PY=11 KUBE_VERSION=1.15.*

Test py35-py38 and Kubernetes 7-10
Test py35-py38 and Kubernetes 7-10
