forked from twisted/nevow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (78 loc) · 3.18 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
sudo: false
language: "python"
python:
- "pypy"
- "2.7"
env:
#
# The `MODE` environment variable will control the kind of Nevow installation
# being tested. See below for the precise meaning of each mode.
#
#
# The `TWISTED` environment variable will give a (shell expression which
# evaluates to) a Twisted requirement string which can be used to select a
# version of Twisted to install. This lets the test suite run against
# multiple versions of Twisted. As a cop out, this configuration only
# actually tests the minimum supported version of Twisted, the latest release
# of Twisted, and the master@HEAD version of Twisted.
#
# For expediency, all combinations of `MODE` and `TWISTED` are not tested.
# The "wheel" MODE is (arbitrarily) selected and all values of `TWISTED` are
# exercised in that mode.
#
- MODE=inplace
- MODE=source
- MODE=sdist
- MODE=wheel
- MODE=wheel
TWISTED='echo twisted'
- MODE=wheel
TWISTED='echo -n "twisted=="; python -c "from setup import _MINIMUM_TWISTED_VERSION; print _MINIMUM_TWISTED_VERSION"'
- MODE=wheel
TWISTED='echo git+https://github.com/twisted/twisted.git'
install:
- "python setup.py --version"
- |
# If appropriate, install a specific version of Twisted.
if [ -v TWISTED ]; then
pip install "$(eval ${TWISTED})"
fi
- |
if [ "${MODE}" == "wheel" ]; then
# Build and install a wheel of Nevow.
pip install wheel
python setup.py bdist_wheel
# Install whatever was just built. The filename is tricky to figure
# out because wheels mangle the version in certain ways. Replicate
# some of that mangling here.
pip install dist/Nevow-"$(python setup.py --version | tr - _)"-py2-none-any.whl
# Also install the extra documentation requirements. Unfortunately, it
# seems pip doesn't automatically handle that case when installing from
# a built file.
pip install Sphinx
elif [ "${MODE}" == "sdist" ]; then
# Build and install a normal source distribution
python setup.py sdist
pip install dist/Nevow-"$(python setup.py --version)".tar.gz
# Also install the extra documentation requirements. Unfortunately, it
# seems pip doesn't automatically handle that case when installing from
# a built file.
pip install Sphinx
elif [ "${MODE}" == "inplace" ]; then
# Don't actually install anything. Just update the environment to make
# the source in the git checkout importable. Then run the tests
# directly against that. This is kind of a "control" case. These
# results should be very similar to the results for any of the
# installation cases.
# Note that we also install the documentation requirements.
pip install --editable '.[doc]'
elif [ "${MODE}" == "source" ]; then
# Install directly from the git checkout.
pip install '.'
# Also install the extra documentation requirements. Unfortunately, it
# seems this can't be specified to the install command above.
pip install Sphinx
fi
script:
- "trial formless nevow"
- "make -C doc html"