magic-wormhole/.travis.yml
Brian Warner 60079a9fcf travis: add codecov, stop using tox, more
This runs tests directly (with 'coverage run' and 'trial'), rather than
running them inside tox, because that was proving difficult.

It upgrades pip first (the travis builders have an older version), to
use and cache wheels for speed. Travis is now configured to retain the
pip cache between runs.

This installs twisted from trunk (as tox was doing), to work around a
bug in the current twisted-15.5.0 release that should be resolved soon.

Travis is told to ignore any branch named WIP-, so I can transfer
branches between computers without causing red builds.

A coverage report is displayed before uploading to codecov.

The wormhole package is installed as --editable, to make the source
filenames in the coverage data match what I get at home. This also
appears necessary to get codecov to display the data (maybe it ignores
data for files outside the starting directory?).
2016-03-02 14:10:59 -08:00

27 lines
540 B
YAML

sudo: false
language: python
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
branches:
except:
- /^WIP-.*$/
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
install:
- pip install -U pip
- pip install pyflakes coverage codecov
- pip install "git+https://github.com/twisted/twisted#egg=twisted"
# - pip install "Twisted>=15.5.0"
- pip install --editable .
script:
- pyflakes setup.py src
- wormhole --version
- coverage run --branch `which trial` wormhole
after_success:
- coverage report
- codecov