forked from pyinvoke/invoke
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (71 loc) · 2.34 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
language: python
sudo: false
cache:
directories:
- $HOME/.cache/pip
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
- "pypy3"
matrix:
# pypy is frequentlyish unstable on Travis, don't let it mark entire status
# as 'bad' =/ (Still worth running it though.)
allow_failures:
- python: pypy
- python: pypy3
fast_finish: true
install:
# Pre-requirements sanity test (again, resembles pure, non-dev install
# environment.) Avoids e.g. spec's 'six' from gumming up our attempts to
# import our vendorized 'six'.
- pip install -r tasks-requirements.txt
- inv --list
# Install remaining dev requirements (test runner, etc)
- pip install -r dev-requirements.txt
# Also create a workable alt-interpreter venv for testing dual package builds
# Python 3 is nicely namespaced, globally. Python 2 is masked by Travis'
# default venv, so we gotta hardcode it.
- "virtualenv alt_env --python=$([[ $TRAVIS_PYTHON_VERSION == 2* ]] && echo python3 || echo /usr/bin/python)"
- alt_env/bin/pip install wheel
script:
# Run unit and integration tests, generating coverage report (skipping html)
# This will fail if the tests fail.
- "inv coverage --no-html"
# Websites build OK?
- inv sites
# Did we break setup.py?
- pip uninstall -y invoke # To undo the implicit -e install from above
- pip install . # NO -e!
- inv -l # Sanity check
# I have this in my git pre-push hook, but contributors probably don't
- flake8
after_success:
# Test distribution builds.
# Have to use env var to override our normal config defaults. Ho hum.
# Also specify the virtualenv we made for the 'alternate' Python version, for
# the dual wheel build step.
- "INVOKE_PACKAGING_SIGN=0 inv release.publish --dry-run --directory=tmp --alt-python=alt_env/bin/python"
# Interpreter-specific wheel
- pip uninstall -y invoke
- "[[ $TRAVIS_PYTHON_VERSION == 3* ]] && pip install tmp/dist/*py3*.whl"
- "[[ $TRAVIS_PYTHON_VERSION == 2* ]] && pip install tmp/dist/*py2*.whl"
- inv -l
# Source distribution
- pip uninstall -y invoke
- "pip install tmp/dist/*.tar.gz"
- inv -l
after_script:
# Upload coverage data to codecov
- codecov
notifications:
irc:
channels: "irc.freenode.org#invoke"
template:
- "%{repository}@%{branch}: %{message} (%{build_url})"
on_success: change
on_failure: change
email: false