forked from Kozea/Radicale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
71 lines (65 loc) · 2.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
language: python
sudo: false
env: PIP=pip3 PYTHON=python3
dist: trusty
matrix:
include:
- os: linux
python: 3.5
- os: linux
python: 3.6
- os: osx
language: generic
- os: linux
python: 3.5
sudo: required
env: WINE_PYTHON=3.5.4 PIP='wine pip' PYTHON='wine python'
notifications:
webhooks:
- https://coveralls.io/webhook?repo_token=COVERALLS_REPO_TOKEN
before_install:
- |
if [ "${TRAVIS_OS_NAME}" == osx ]; then
brew install python3 ||
brew upgrade python3
fi
- |
if [ "${TRAVIS_OS_NAME}" == linux -a -n "${WINE_PYTHON}" ]; then
pushd "$(mktemp -d)" &&
sudo dpkg --add-architecture i386 &&
wget https://dl.winehq.org/wine-builds/Release.key -O Release.key &&
sudo apt-key add Release.key &&
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ &&
sudo apt-get update &&
sudo apt-get install -y --no-install-recommends unzip winehq-stable &&
curl "https://www.python.org/ftp/python/${WINE_PYTHON}/python-${WINE_PYTHON}-embed-win32.zip" -o python.zip &&
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py &&
unzip python.zip -d python &&
pushd python &&
LIB="$(echo python*.zip)" &&
mv "${LIB}" "${LIB}.tmp" &&
unzip "${LIB}.tmp" -d "${LIB}" &&
rm "${LIB}.tmp" &&
popd &&
mv python "$(winepath 'C:\python')" &&
printf %b 'Windows Registry Editor Version 5.00\n'\
'[HKEY_CURRENT_USER\\Environment]\n'\
'"Path"="c:\\\\windows;c:\\\\windows\\\\system;c:\\\\python;c:\\\\python\\\\scripts"\n' > path.reg &&
wine regedit path.reg &&
wine python get-pip.py &&
rm -rf "$(dirs -l +0)" &&
popd
fi
install:
- pip3 install --upgrade coverage coveralls
- ${PIP} install --upgrade --editable .[test,md5,bcrypt]
script:
- ${PYTHON} setup.py test
after_success:
- |
if [ "${TRAVIS_OS_NAME}" == linux -a -n "${WINE_PYTHON}" ]; then
config="$(mktemp)"
printf '[paths]\nsource =\n .\n %s\n' "$(winepath --windows '')" >"${config}"
coverage3 combine --rcfile "${config}" .coverage
fi
- env COVERALLS_PARALLEL=true coveralls