-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (47 loc) · 1.96 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
sudo: required
language: python
python:
- "3.5"
# - "3.6" # current default Python on Travis CI
# - "3.7"
# - "3.7-dev" # 3.7 development branch
# - "3.8-dev" # 3.8 development branch
# - "nightly" # nightly build
services:
- mysql
env:
- PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages/:/usr/local/lib/python3/dist-packages:$PWD:$PWD/server4_api/
#cache: pip
branches:
only:
- master
- develop
- feature/*
install:
- sudo apt-get install -y python3-mysqldb python3-pymysql python3-pip pylint3 python3 python3-pytest wget python3-memcache
- sudo pip3 install --upgrade pip
- sudo pip3 install -r requirements.txt
before_script:
- export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages/:/usr/local/lib/python3/dist-packages:$PWD:$PWD/server4_api
- wget -O - https://raw.githubusercontent.com/erikni/logni.py/develop/setup.sh | bash
- wget -O - https://raw.githubusercontent.com/happysources/response-api-py/develop/setup.sh | bash
- wget -O - https://raw.githubusercontent.com/happysources/validate-data-py/develop/setup.sh | bash
- wget -O - https://raw.githubusercontent.com/happysources/mysql-wrapper-py/develop/setup.sh | bash
- wget -O - https://raw.githubusercontent.com/happysources/memcache-wrapper-py/develop/setup.sh | bash
- wget https://raw.githubusercontent.com/happysources/mysql-wrapper-py/develop/test_db.sql
- mysql -u root < test_db.sql
- cp -v /usr/local/lib/python3/dist-packages/*.py .
# command to run tests
script:
- export PYTHONPATH=$PYTHONPATH:/usr/lib/python3/dist-packages/:/usr/local/lib/python3/dist-packages:$PWD:$PWD/server4_api
- export LOGNI_NAME=server4
- export LOGNI_MASK=ALL
- export LOGNI_CONSOLE=1
- echo "pylint3 --errors-only server4_api/*.py ... "
- pylint3 --errors-only server4_api/*.py
# - echo "pytest ... "
# - py.test-3
- echo "run server4_api.py ... "
- python3 server4_api/server4_api.py
- echo "run examples ... "
- python3 test/example/basic_example.py