forked from aio-libs-abandoned/aioredis-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (61 loc) · 1.49 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
language: python
python:
- "3.3"
- "3.4"
env:
global:
- REDIS_PORT_1=6379
- REDIS_PORT_2=6380
- REDIS_SOCKET=/tmp/aioredis.sock
matrix:
- USE_REDIS_2_6=false
- USE_REDIS_2_6=true
before_install:
# - sudo add-apt-repository -y ppa:chris-lea/redis-server
- sudo add-apt-repository "deb http://ppa.launchpad.net/chris-lea/redis-server/ubuntu oneiric main"
- sudo apt-get update -qq
- >
if [ "$USE_REDIS_2_6" = "true" ]; then
sudo apt-get install redis-server/oneiric -V --force-yes;
else
sudo apt-get install redis-server -V;
fi
# - redis-server --version
install:
- pip install hiredis
- pip install pyflakes
- pip install pep8
- pip install coverage
- pip install coveralls
- pip install -e .
before_script:
# main redis instance listening port & socket
- >
redis-server --daemonize yes
--pidfile ./redis-server.pid
--unixsocket $REDIS_SOCKET
--port $REDIS_PORT_1
--save ""
# second redis instance, yet for migrate command tests
- >
redis-server --daemonize yes
--pidfile ./redis-server-2.pid
--port $REDIS_PORT_2
--save ""
- sleep 3
- redis-cli -s $REDIS_SOCKET PING
- redis-cli -p $REDIS_PORT_2 PING
- export REDIS_VERSION="$(redis-cli -s $REDIS_SOCKET INFO SERVER | sed -n 2p)"
- echo $REDIS_VERSION
script:
- pyflakes aioredis tests
- pep8 aioredis tests
- python runtests.py --coverage -v
# checking examples
- >
for example in $(find $PWD/examples/ -name "*.py"); do
echo "Running ${example}";
python3 ${example} || exit 1;
done;
after_script:
- coveralls