Permalink
8628db7 May 24, 2018
@bitprophet @rpkilby
84 lines (83 sloc) 3.01 KB
language: python
sudo: required
dist: trusty
cache:
directories:
- $HOME/.cache/pip
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "pypy"
- "pypy3"
matrix:
# pypy3 (as of 2.4.0) has a wacky arity issue in its source loader. Allow it
# to fail until we can test on, and require, PyPy3.3+. See
# pyinvoke/invoke#358.
allow_failures:
- python: pypy3
# Disabled per https://github.com/travis-ci/travis-ci/issues/1696
# fast_finish: true
install:
# TODO: real test matrix with at least some cells combining different invoke
# and/or paramiko versions, released versions, etc
# Invoke from master for parity
- "pip install -e git+https://github.com/pyinvoke/invoke#egg=invoke"
# And invocations, ditto
- "pip install -e git+https://github.com/pyinvoke/invocations#egg=invocations"
# Paramiko ditto
- "pip install -e git+https://github.com/paramiko/paramiko#egg=paramiko"
# Self
- pip install -e .
# Limit setuptools as some newer versions have Issues(tm). This needs doing
# as its own step; trying to do it via requirements.txt isn't always
# sufficient.
- pip install "setuptools<34"
# Dev requirements
# TODO: follow invoke and split it up a bit so we're not pulling down
# conflicting or unused-by-travis deps?
- pip install -r dev-requirements.txt
# Sanity test of the Invoke layer, if that's busted everything is
- inv --list
# Sanity test of Fabric itself
- fab --version
before_script:
# Create 'sudouser' w/ sudo password & perms on Travis' homedir
- inv travis.make-sudouser
# Allow us to SSH passwordless to localhost
- inv travis.make-sshable
script:
# Fast syntax check failures for more rapid feedback to submitters
# (Travis-oriented metatask that version checks Python, installs, runs.)
- inv travis.blacken
# I have this in my git pre-push hook, but contributors probably don't
- flake8
# Execute full test suite + coverage, as the new sudo-capable user
- inv travis.sudo-coverage
# Execute integration tests too. TODO: merge under coverage...somehow
# NOTE: this also runs as the sudo-capable user, even if it's not necessarily
# doing any sudo'ing itself - the sudo-capable user is also the ssh-able
# user...
- inv travis.sudo-run "inv integration --capture=no"
# Websites build OK? (Not on PyPy3, Sphinx is all "who the hell are you?" =/
- "if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then inv sites docs.doctest; fi"
# Did we break setup.py?
- inv travis.test-installation --package=fabric --sanity="fab --version"
# Test distribution builds.
- inv travis.test-packaging --package=fabric --sanity="fab --version"
# Again, but as 'fabric2'
- rm -rf tmp
- pip uninstall -y fabric
- "PACKAGE_AS_FABRIC2=yes inv travis.test-packaging --package=fabric2 --sanity=\"fab2 --version\""
after_success:
# Upload coverage data to codecov
- codecov
notifications:
irc:
channels: "irc.freenode.org#fabric"
template:
- "%{repository_name}@%{branch}: %{message} (%{build_url})"
on_success: change
on_failure: change
email: false