-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
53 lines (45 loc) · 1.78 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
# =================================================================================================
# All Rights Reserved.
# =================================================================================================
# File description:
# .travis.yml to set up CI
#
# =================================================================================================
# Date Name Description of Change
# 24-Aug-2021 Wayne Shih Initial create
# 17-Oct-2021 Wayne Shih Add codacy
# 05-Nov-2021 Wayne Shih Turn off curl's verification of the certificate by -k option
# 06-Nov-2021 Wayne Shih Add pylint
# 25-Nov-2021 Wayne Shih React to requirements.txt update
# 26-May-2022 Wayne Shih Add memcached
# 28-May-2022 Wayne Shih Add redis
# $HISTORY$
# =================================================================================================
language: python
sudo: enabled
python:
- "3.6"
# https://docs.travis-ci.com/user/database-setup/
services:
- mysql
- memcached
- redis-server
# commands to install dependencies
install:
- pip install -U pip
- pip install -r requirements.txt
- pip install coverage
- pip install codecov
- pip install pylint
# command to set up environment
before_script:
- sudo bash ./provision.sh
- export CODACY_PROJECT_TOKEN=a7b57e9b842647d29d7e144d2a906345
# command to run tests and pylint
script:
- coverage run --source='.' manage.py test && coverage report -m && coverage html && coverage xml
- touch __init__.py; pylint $(pwd); rm __init__.py
# Push the results back to codecov
after_success:
- codecov
- bash <(curl -Lsk https://coverage.codacy.com/get.sh) report -r coverage.xml