-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
78 lines (77 loc) · 3.04 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
72
73
74
75
76
77
78
language: python
sudo: required
dist: trusty
cache:
directories:
- $HOME/.cache/pip
python:
- "2.7"
# - "3.4" should be easy to fix
- "3.5"
- "3.6"
- "3.7-dev"
- "nightly"
# only one test fails on pypy, but i'm tired of looking at the red Xs.
# - "pypy"
# - "pypy3"
matrix:
# NOTE: comment this out if we have to reinstate any allow_failures, because
# of https://github.com/travis-ci/travis-ci/issues/1696 (multiple
# notifications)
fast_finish: true
install:
# For some reason Travis' build envs have wildly different pip/setuptools
# versions between minor Python versions, and this can cause many hilarious
# corner packaging cases. So...
- pip install -U pip
# Setuptools 34+ seems to get less stable
- pip install 'setuptools>33,<34'
# 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
- pip list --format=columns
# 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
# Dirty hack because we need our invoke to be picked up. TODO remove this
# by subclassing executor / application maybe? Ew.
- pip uninstall invoke -y
# This is an even dirtier hack because we want `inv` back.
- pip install -e .
before_script:
# Create 'sudouser' w/ sudo password & perms on Travis' homedir
- inv travis.make-sudouser
- flake8
script:
# Execute full test suite + coverage, as the new sudo-capable user
- inv travis.sudo-coverage
# Websites build OK? (Not on PyPy3, Sphinx is all "who the hell are you?" =/
- "if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then inv docs; fi"
# TODO put these back. Mysteriously broke based on some permission issues despite no change to
# seutp.py. Don't care to deal with it now as I don't change the setup.
# Doctests in websites OK? (Same caveat as above...)
# Skip the doctests; magicinvoke doesn't have any.
# - "if [[ $TRAVIS_PYTHON_VERSION != 'pypy3' ]]; then inv docs.doctest; fi"
# Did we break setup.py?
# - inv travis.test-installation --package=magicinvoke --sanity="inv --list"
# Test distribution builds, including some package_data based stuff
# (completion script printing)
# - "inv travis.test-packaging --package=magicinvoke --sanity='inv --list && inv --print-completion-script zsh' --alt-python=alt_env/bin/python"
after_success:
# Upload coverage data to codecov
- codecov
notifications:
irc:
channels: "irc.freenode.org#invoke"
template:
- "%{repository_name}@%{branch}: %{message} (%{build_url})"
on_success: change
on_failure: change
on_error: change
email: false