forked from earthreader/libearth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (78 loc) · 2.53 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
python:
- pypy
- 2.6
- 2.7
- 3.2
- 3.3
- 3.4
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 pep8;
if [[ `python -c 'from sys import *;print((3,3)<=version_info<(3,4))'` == 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 install -qq mono-devel mercurial;
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;
hg clone https://bitbucket.org/dahlia/py-ironpython /tmp/py-lib;
hg clone https://bitbucket.org/dahlia/pytest-ironpython /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,3)<=version_info<(3,4))'` == True ]]; then
py.test -v --durations=20 tests || exit $?;
else
py.test -v --cov libearth --durations=20 tests || exit $?;
fi;
pep8 || 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