forked from kivy/plyer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
184 lines (133 loc) · 4.27 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
matrix:
fast_finish: true
include:
- language: python
python: 2.7
env: RUN=unit
os: linux
dist: trusty
- language: python
python: 3.5
env: RUN=unit COVERALLS=1
os: linux
dist: trusty
- language: python
python: 3.5
env: RUN=pep8
os: linux
dist: trusty
- language: generic
env: RUN=unit PY=2
os: osx
- language: generic
env: RUN=unit PY=3
os: osx
before_install:
# https://github.com/travis-ci/travis-ci/issues/6307
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
rvm get head;
fi;
install:
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
if [ "${RUN}" == "pep8" ]; then
python -m pip install pycodestyle;
fi;
if [ "${RUN}" != "pep8" ]; then
echo "[YML] Necessary build stuff";
sudo add-apt-repository ppa:fkrull/deadsnakes -y;
sudo apt-get update;
sudo apt-get -y install --reinstall
python-setuptools
python-dev
python3.5-dev;
python -m pip install --upgrade nose coveralls;
echo "[YML] plyer.notification deps";
echo "[YML] * plyer.notification.NotifyDbus";
sudo apt-get -y install --reinstall
dbus
dbus-x11
libdbus-1-3
libdbus-1-dev
libdbus-glib-1-2
libdbus-glib-1-dev;
python -m pip install dbus-python;
python3 -m pip install dbus-python;
echo "[YML] * plyer.notification.NotifySendNotification";
sudo apt-get -y install libnotify-bin;
echo "[YML] * Fixing DBusException";
echo "[YML] * org.freedesktop.DBus.Error.ServiceUnknown";
echo "[YML] * The name org.freedesktop.Notifications was not provided";
sudo apt-get -y install --reinstall notification-daemon notify-osd;
echo "[YML] plyer.battery deps";
sudo apt-get install upower;
fi;
fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
ariagh=https://github.com/aria2/aria2/releases/download/release-1.29.0/;
ariadmg=aria2-1.29.0-osx-darwin.dmg;
pyftp=https://www.python.org/ftp/python/3.5.2/;
py3pkg=python-3.5.2-macosx10.6.pkg;
curl -O -L $ariagh$ariadmg;
hdiutil attach aria2-1.29.0-osx-darwin.dmg;
sudo installer -package "/Volumes/aria2 1.29.0 Intel/aria2.pkg" -target /;
if [ "${PY}" == "3" ]; then
curl -O -L $pyftp$py3pkg;
sudo installer -package python-3.5.2-macosx10.6.pkg -target /;
pip3 install --upgrade --user nose cython;
pip3 install https://github.com/kivy/pyobjus/zipball/master;
else
pip install --upgrade --user nose cython;
pip install https://github.com/kivy/pyobjus/zipball/master;
fi;
fi;
before_script:
- if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ "${RUN}" != "pep8" ]; then
export DISPLAY=:99.0;
/sbin/start-stop-daemon
--start
--quiet
--pidfile /tmp/custom_xvfb_99.pid
--make-pidfile
--background
--exec /usr/bin/Xvfb --
:99
-screen 0 1280x720x24
-ac +extension GLX;
export PYTHONPATH=$PYTHONPATH:$(pwd);
fi;
script:
- python -m pip install .
# setup dummies before running tests
# nose throws stuff to globals and won't clean up afterwards
- python ./plyer/tests/dummy_setup.py
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
set -ex;
if [ "${RUN}" == "unit" ]; then
python -m nose.core -s ./plyer/tests --with-coverage;
fi;
if [ "${RUN}" == "pep8" ]; then
pycodestyle "$(pwd)"
--exclude=pep8.py,compat.py,utils.py
--ignore=E402;
fi;
if [ "${COVERALLS}" == "1" ] && [ "${TRAVIS_BRANCH}" == "master" ]; then
coveralls;
fi;
fi;
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
set -ex;
if [ "${PY}" == "3" ]; then
python3 -m nose.core ./plyer/tests;
else
python -m nose.core ./plyer/tests;
fi;
fi;
# remove dummies and return to previous state
- python ./plyer/tests/dummy_teardown.py
notifications:
webhooks:
urls:
- https://kivy.org:5000/travisevent
on_success: always
on_failure: always
on_start: always