/
.travis.yml
133 lines (104 loc) · 3.62 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
env:
global:
- PACKAGE="debugtools" # Package name
- SUBLIME_TEXT_VERSION="3"
# # use UNITTESTING_TAG to specific tag of UnitTesting
# - UNITTESTING_TAG="master"
# mutliple os matrix
# https://docs.travis-ci.com/user/multi-os/#Python-example-(unsupported-languages)
matrix:
include:
- os: linux
python: 3.4
language: python
- os: linux
python: 2.7
language: python
env: TOXENV=py27
- os: linux
python: 3.4
language: python
env: TOXENV=py34
- os: linux
python: 3.5
language: python
env: TOXENV=py35
- os: linux
python: 3.6
language: python
env: TOXENV=py36
- os: linux
python: 3.7
language: python
env: TOXENV=py37
dist: xenial
# Currently Travis OSX only supports Python 2.7 and 3.6
- os: osx
python: 2.7
language: generic
- os: osx
python: 2.7
language: generic
env: TOXENV=py27
- os: osx
python: 3.6
language: generic
env: TOXENV=py36
before_install:
- pwd
# if $TOXENV is empty
- if [ -z "$TOXENV" ]; then
curl -OL https://raw.githubusercontent.com/evandrocoan/UnitTesting/master/sbin/travis.sh;
fi
- if [ -z "$TOXENV" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update > /dev/null;
python --version;
python3 --version;
brew upgrade python;
python --version;
python3 --version;
fi
# enable gui, see https://docs.travis-ci.com/user/gui-and-headless-browsers
- if [ -z "$TOXENV" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
fi
install:
- if ! [ -z "$TOXENV" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then
pip install --disable-pip-version-check tox;
pip install --disable-pip-version-check debug_tools;
pip install --disable-pip-version-check -e .[full] --upgrade;
pip install --disable-pip-version-check diff-match-patch;
pip list;
fi
- if ! [ -z "$TOXENV" ] && [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update > /dev/null;
brew install python3;
sudo -H pip3 install --disable-pip-version-check virtualenv;
pip3 install --disable-pip-version-check tox;
pip3 install --disable-pip-version-check debug_tools;
pip3 install --disable-pip-version-check -e .[full] --upgrade;
pip3 install --disable-pip-version-check diff-match-patch;
pip3 list;
fi
# bootstrap the testing environment
# install Package Control and package dependencies
- if [ -z "$TOXENV" ]; then
sh travis.sh bootstrap;
sh travis.sh clone_git_package "https://github.com/evandroforks/portalockerfile" "portalockerfile";
sh travis.sh clone_git_package "https://github.com/evandroforks/diffmatchpatch" "diffmatchpatch";
sh travis.sh clone_git_package "https://github.com/evandroforks/concurrentloghandler" "concurrentloghandler";
sh travis.sh install_package_control;
fi
script:
# run tests with test coverage report
- if [ -z "$TOXENV" ]; then
sh travis.sh run_tests; sh travis.sh show_full_sublime_text_console $?;
fi
- if ! [ -z "$TOXENV" ]; then
tox;
fi
after_success:
- echo AFTER SUCCESS
notifications:
email: false