#
# This is the Travis-CI configuration.
#

language: "python"

# This is how you get container-based environments on Travis-CI.  And
# container-based environments are how you get fast test runs.
sudo: false

# Only build master; for "push" builds, this is when the branch pushed
# to is master, for "pr" builds, this is when the merge base of the PR
# is master.
branches:
  only:
    - "master"

env:
  global:
    - "TXKUBE_HYPOTHESIS_PROFILE=ci"

matrix:
  include:
    - python: 2.7
    - python: 3.6

cache:
  directories:
    # Cache the pip download cache across runs to avoid having to
    # repeatedly download packages over the network.
    - "$HOME/.cache/pip"

install:
  - "pip install --upgrade pip setuptools wheel coverage codecov pyflakes"
  # Some Travis Python environments start with an out-dated attrs.  Tell pip
  # it is allowed to upgrade dependencies while installing txkube so we get a
  # newer version which can actually be used.
  - "pip install --upgrade .[dev]"

script:
  - "pyflakes src"
  - "python -Wdefault::DeprecationWarning -m coverage run --rcfile=${PWD}/.coveragerc -m twisted.trial txkube"
  # See .coveragerc for an explanation of this step.
  - "python -m coverage combine .coverage"

after_script:
  - "codecov"

#
# This is the Travis-CI configuration.
#

language: "python"

# This is how you get container-based environments on Travis-CI.  And
# container-based environments are how you get fast test runs.
sudo: false

# Only build master; for "push" builds, this is when the branch pushed
# to is master, for "pr" builds, this is when the merge base of the PR
# is master.
branches:
  only:
    - "master"

env:
  global:
    - "TXKUBE_HYPOTHESIS_PROFILE=ci"

matrix:
  include:
    - python: 2.7
    - python: 3.6

cache:
  directories:
    # Cache the pip download cache across runs to avoid having to
    # repeatedly download packages over the network.
    - "$HOME/.cache/pip"

before_install:
  # Some Travis Python environments start with an out-dated (older than
  # minimum requirement specified by our dependencies) attrs.  Get rid of that
  # so a recent version can be installed during the install step.
  - "pip uninstall --yes attrs"

install:
  - "pip install --upgrade pip setuptools wheel coverage codecov pyflakes"
  - "pip install .[dev]"

script:
  - "pyflakes src"
  - "python -Wdefault::DeprecationWarning -m coverage run --rcfile=${PWD}/.coveragerc -m twisted.trial txkube"
  # See .coveragerc for an explanation of this step.
  - "python -m coverage combine .coverage"

after_script:
  - "codecov"

Uninstall it instead; upgrading doesn't work.
Uninstall it instead; upgrading doesn't work.
