-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.travis.yml
85 lines (85 loc) · 2.86 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
language: python
python:
- pypy
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
env:
- PYTHON_VM=cpython
matrix:
include:
- python: 2.7
env: PYTHON_VM=ironpython
- python: pypy
env: PYTHON_VM=pypy
exclude:
- python: pypy
env: PYTHON_VM=cpython
install:
- echo ko_KR.UTF-8 UTF-8 | sudo tee -a /etc/locale.gen
- echo ja_JP.UTF-8 UTF-8 | sudo tee -a /etc/locale.gen
- sudo dpkg-reconfigure -f noninteractive locales
- if [[ "$PYTHON_VM" == "cpython" ]]; then
pip install pytest mock pytest-capturelog flake8;
if [[ `python -c 'from sys import *;print((3,4)<=version_info<(3,5))'` == False ]]; then
pip install pytest-cov coveralls;
fi;
fi
- if [[ "$PYTHON_VM" == "pypy" ]]; then
pip install pytest mock;
fi
- if [[ "$PYTHON_VM" == "ironpython" ]]; then
sudo apt-get update;
sudo apt-get install -qq mono-devel;
curl -L -o /tmp/ironpython.zip https://github.com/IronLanguages/main/releases/download/ipy-2.7.4/IronPython-2.7.4.zip;
unzip /tmp/ironpython.zip;
curl -Lo /tmp/py-lib.zip https://bitbucket.org/dahlia/py-ironpython/get/default.zip;
curl -Lo /tmp/pytest.zip https://bitbucket.org/dahlia/pytest-ironpython/get/default.zip;
unzip /tmp/py-lib.zip -d /tmp/py-lib;
unzip /tmp/pytest.zip -d /tmp/pytest;
ln -s /tmp/py-lib/*/py;
ln -s /tmp/pytest/*/_pytest;
ln -s /tmp/pytest/*/pytest.py;
pushd /tmp;
curl https://pypi.python.org/packages/source/m/mock/mock-1.0.1.tar.gz | tar xvfz -;
popd;
ln -s /tmp/mock-1.0.1/mock.py;
fi
script:
- if [[ "$PYTHON_VM" == "cpython" ]]; then
pip install -e .;
python -mlibearth.version;
if [[ `python -c 'from sys import *;print((3,4)<=version_info<(3,5))'` == True ]]; then
py.test -v --durations=20 tests || exit $?;
else
py.test -v --cov libearth --durations=20 tests || exit $?;
fi;
if [[ `python -c 'from sys import *;print(version_info in ((2, 7), (3, 4)))'` == True ]]; then
pip install lxml || exit $?;
py.test -v --durations=20 tests || exit $?;
fi;
flake8 || exit $?;
python docs/coverage.py || exit $?;
fi
- if [[ "$PYTHON_VM" == "pypy" ]]; then
pip install -e .;
python -mlibearth.version;
py.test -v --durations=20 tests || exit $?;
fi
# IronPython interpreter frequently get broken, so try once more to make sure our tests actually fail
- if [[ "$PYTHON_VM" == "ironpython" ]]; then
mono IronPython-2.7.4/ipy.exe -X:ExceptionDetail -X:ShowClrExceptions -X:Frames pytest.py -v -s --assert=plain tests ||
mono IronPython-2.7.4/ipy.exe -X:ExceptionDetail -X:ShowClrExceptions -X:Frames pytest.py -v -s --assert=plain tests || exit $?;
fi
after_success:
- if [[ "$PYTHON_VM" == "cpython" && `python -c 'from sys import *;print((3,3)<=version_info<(3,4))'` == False ]]; then
coveralls;
fi
notifications:
irc:
channels:
- "irc.ozinger.org#earthreader"
on_success: change
on_failure: always