File tree Expand file tree Collapse file tree 6 files changed +95
-19
lines changed Expand file tree Collapse file tree 6 files changed +95
-19
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- if [ " ${TRAVIS_OS_NAME} " == " linux" ]; then
3
+ if [ " ${TRAVIS_OS_NAME} " == " linux" -a " ${BUILD} " == " full " ]; then
4
4
# Allow docker guests to connect to the database
5
- sudo service postgresql stop 9.4
5
+ sudo service postgresql stop ${PGVERSION}
6
6
echo " listen_addresses = '*'" | \
7
- sudo tee --append /etc/postgresql/9.4 /main/postgresql.conf
7
+ sudo tee --append /etc/postgresql/${PGVERSION} /main/postgresql.conf
8
8
echo " host all all 172.17.0.0/16 trust" | \
9
- sudo tee --append /etc/postgresql/9.4 /main/pg_hba.conf
10
- sudo service postgresql start 9.4
9
+ sudo tee --append /etc/postgresql/${PGVERSION} /main/pg_hba.conf
10
+ sudo service postgresql start ${PGVERSION}
11
11
fi
Original file line number Diff line number Diff line change 3
3
set -e -x
4
4
5
5
6
- if [ -z " ${TRAVIS_TAG} " ]; then
6
+ if [ -z " ${TRAVIS_TAG} " -o " ${BUILD} " != " full " ]; then
7
7
# Not a release
8
8
exit 0
9
9
fi
Original file line number Diff line number Diff line change 4
4
5
5
set -e -x
6
6
7
+ if [ " ${BUILD} " != " docs" ]; then
8
+ echo " Skipping documentation build."
9
+ exit 0
10
+ fi
11
+
7
12
SOURCE_BRANCH=" master"
8
13
TARGET_BRANCH=" gh-pages"
9
14
DOC_BUILD_DIR=" _build/html/"
@@ -17,12 +22,15 @@ pip install -r docs/requirements.txt
17
22
make htmldocs
18
23
19
24
if [ " ${TRAVIS_PULL_REQUEST} " != " false" \
20
- -o " ${TRAVIS_BRANCH} " != " ${SOURCE_BRANCH} " \
21
25
-o " ${TRAVIS_OS_NAME} " != " linux" ]; then
22
26
echo " Skipping documentation deploy."
23
27
exit 0
24
28
fi
25
29
30
+ if [ " ${TRAVIS_BRANCH} " != " ${SOURCE_BRANCH} " -a -z " ${TRAVIS_TAG} " ]; then
31
+ echo " Skipping documentation deploy."
32
+ exit 0
33
+ fi
26
34
27
35
git config --global user.email " infra@magic.io"
28
36
git config --global user.name " Travis CI"
Original file line number Diff line number Diff line change 2
2
3
3
set -e -x
4
4
5
+ if [ " ${BUILD} " != " quick" -a " ${BUILD} " != " full" ]; then
6
+ echo " Skipping tests."
7
+ exit 0
8
+ fi
9
+
5
10
if [ " ${TRAVIS_OS_NAME} " == " osx" ]; then
6
11
PYENV_ROOT=" $HOME /.pyenv"
7
12
PATH=" $PYENV_ROOT /bin:$PATH "
8
13
eval " $( pyenv init -) "
9
14
fi
10
15
11
- make && make test
12
- make debug && make test
16
+ if [ " ${BUILD} " == " quick" ]; then
17
+ make && make quicktest
18
+ else
19
+ make && make test
20
+ make debug && make test
21
+ fi
Original file line number Diff line number Diff line change 1
1
language : generic
2
2
3
- sudo : required
4
-
5
- services :
6
- - postgresql
7
- - docker
8
-
9
3
env :
10
4
global :
11
5
- PYMODULE=asyncpg
14
8
- secure : " XEUUpzRZeesmMUfImKbCJm1D1LmWXkCW6ywtquuLEp6vRboH+URW8XtOhPehj47kn+/D4LpS9DR7GTBQ2DJR6kb07uqMu4b3WhTj8gewc8T5A0bxbdkkxHDfUCw7RF+EYLoN+n8xdqgBHImLLeuY/iRf+/IUJxGBARC4OZkejXhqJktNkXNO7aDcFfl9jcU0s1azaGbgeaShSAnnQPcdnJQ5tn7qHPPjTMWWly09A0K6CGqFK9bXUlD/hLGyC6NjOc8zMhv6vt4rI/zkjtSf219t4svivTjZsWWP6LMoWNWvwbOVfr8MThU4449lfplTWkmvEP6cQAJrvLjBOKOfwvV1MhqCMLGUMxeagYq7bHwSKQQ7t+r4a3jX94go+3Y1AQ0z9Yun+UW4qxrmHeIR5tLh2cePQylkIiTaWePZNPsVl3xF9HJtWcVgNgij4r+EU6WC9EqlV4DJyISjsptSa69CLBieWrzPYNxCPr6cTXYKKu6svRj3uho2q+c3Iavzjt4e5VEgppeduXIrvqMsaAa/E+j7b3QmC0HfZ4k8U5J2evtell5gh70Vf20A9LsOF06m+I0mSDwrpGasSFCNrWH4n3cUDTlGzc93Zqw5eAmg0yYxLKWk1sHNLOB3hNn+NLSIkS6Drcrsya+Fp5k93I4qDIXvC9n7ODLMirAJ76o="
15
9
16
10
matrix :
11
+ fast_finish : true
12
+
17
13
include :
18
14
- os : osx
19
- osx_image : xcode7.1 # OS X 10.10
20
15
# Travis macOS env does not support Python yet,
21
16
# so we have to set things up manually in install.sh.
22
17
env : PYTHON_VERSION=3.5.2
23
18
PIP_USER=1
24
19
20
+ - os : linux
21
+ dist : precise
22
+ sudo : false
23
+ language : python
24
+ python : " 3.5"
25
+ services : postgresql
26
+ env : BUILD=quick PGVERSION=9.1
27
+ addons :
28
+ postgresql : ' 9.1'
29
+
25
30
- os : linux
26
31
dist : trusty
32
+ sudo : false
27
33
language : python
28
34
python : " 3.5"
29
- services : [postgresql, docker]
35
+ services : postgresql
36
+ env : BUILD=quick PGVERSION=9.2
37
+ addons :
38
+ postgresql : ' 9.2'
39
+
40
+ - os : linux
41
+ dist : trusty
42
+ sudo : false
43
+ language : python
44
+ python : " 3.5"
45
+ services : postgresql
46
+ env : BUILD=quick PGVERSION=9.3
47
+ addons :
48
+ postgresql : ' 9.3'
49
+
50
+ - os : linux
51
+ dist : trusty
52
+ sudo : false
53
+ language : python
54
+ python : " 3.5"
55
+ services : postgresql
56
+ env : BUILD=quick PGVERSION=9.4
30
57
addons :
31
58
postgresql : ' 9.4'
32
59
60
+ - os : linux
61
+ dist : trusty
62
+ sudo : false
63
+ language : python
64
+ python : " 3.5"
65
+ services : postgresql
66
+ env : BUILD=quick PGVERSION=9.5
67
+ addons :
68
+ postgresql : ' 9.5'
69
+
70
+ - os : linux
71
+ dist : trusty
72
+ sudo : false
73
+ language : python
74
+ python : " 3.5"
75
+ env : BUILD=docs
76
+
77
+ - os : linux
78
+ dist : trusty
79
+ sudo : required
80
+ language : python
81
+ python : " 3.5"
82
+ env : BUILD=full PGVERSION=9.6
83
+ services : [postgresql, docker]
84
+ addons :
85
+ postgresql : ' 9.6'
86
+
33
87
cache :
34
88
directories :
35
89
- $HOME/.cache/pip
@@ -57,3 +111,4 @@ deploy:
57
111
on :
58
112
tags : true
59
113
all_branches : true
114
+ condition : ' "${BUILD}" == "full"'
Original file line number Diff line number Diff line change 1
- .PHONY : compile debug test clean all
1
+ .PHONY : compile debug test quicktest clean all
2
2
3
3
4
4
PYTHON ?= python
33
33
USE_UVLOOP=1 $(PYTHON ) -m unittest discover -s tests
34
34
35
35
36
+ quicktest :
37
+ $(PYTHON ) -m unittest discover -s tests
38
+
39
+
36
40
sdist : clean compile test
37
41
$(PYTHON ) setup.py sdist
38
42
@@ -41,5 +45,5 @@ release: clean compile test
41
45
$(PYTHON ) setup.py sdist upload
42
46
43
47
44
- htmldocs :
48
+ htmldocs : compile
45
49
$(MAKE ) -C docs html
You can’t perform that action at this time.
0 commit comments