-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
138 lines (114 loc) · 6.18 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
133
134
135
136
137
138
language: python
addons:
apt:
update: false
postgresql: "9.6"
dist: xenial
cache:
- pip
python:
- '3.5'
- '3.6'
- '3.7-dev'
branches:
only:
- master
- dev
- /\d+\.\d+(\.\d+)?(\S*)?$/
sudo: false
services:
- rabbitmq
- redis-server
- postgresql
before_install:
- virtualenv venv
- sudo rm -f /etc/boto.cfg
- source venv/bin/activate
install:
- pip install --upgrade pip
- pip install -r requirements.txt --upgrade
- pip install -r requirements_test.txt --upgrade
- pip install coveralls codecov codacy-coverage
before_script:
- psql -c "CREATE DATABASE travisci;" -U postgres
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- python manage.py check
- python manage.py collectstatic --noinput
- python manage.py makemigrations feedcrunch
- python manage.py migrate
- python manage.py createcachetable
- coverage run manage.py test
#- coverage xml
after_success:
- coveralls
- codecov
- python-codacy-coverage -r coverage.xml
notifications:
matrix:
- email: false
slack:
secure: CX3x9d562S90xbISGDBGmdrCeu6Bvv/kezMGDa6U2nOAgu6esDVXFwT4GRIPze4tW8zbH7yuDeRPKTIU+p/GpOu4woS+u/c/n9OYVKwRjfqZE2LhHGmu8QkpXzpeZBSZeRWVFmYkIzsgRNcHkVbyMVJoByKGfAVD3x0ENvm3Sr3Ij2WyvRky6ZrgmTXuhil+Fqph9uamq3C1+G8DyTL9OFnz4hZZSktO29SmL9F3G/hvTMlZ9ezan2LngVPaYllfxWhMxuWkjkt7sdnc1iwlq0yxLxoQmokQao+FGMFlUNRT0ASIG0NhBKU/GJl0XR1l2n4zfy4SiBZaU1aDnQvIiFJABW6GUqdbYi4Fzi/nZS7mZTbMZcBTlHFoG7Ebu6StLINTp5bLk+90sa/RAWG4CXwoDZLSpD6hPeun482Zud3wHKyOAB3rwFP2qR2qwGM+ZMh3+49Ca7ngdloNs3DFhY9ISKLqGgUUD2zcS97U8H8qSAbAqlvzqU1oWhv7AIh2sjU7159XfH3yaXyV9mqtyBCtn9/NrYWt9OtSmb1EsMsP/1OjWGgzDGqaeVsjEINnbm/0ERSHFzRfyKqc+fejQpkVvWj0bA/Z1RB9FBfgZQSzkkLHfxwm/tVF6PVg36NxwD/HGIlRzJFlThB8XcK+j4t2J8kwbkskYyZoM6hOGOQ=
env:
global:
- RABBITMQ_URL='amqp://guest:guest@localhost:5672/'
- REDIS_URL='redis://localhost:6379'
- DATABASE_URL='postgres://postgres:@localhost:5432/travisci'
- DEBUG='True'
- EMAIL_DEFAULT_SENDER='local@local.host'
- TRAVIS='True'
- ARTIFACT_NAME='Feedcrunch-Application.zip'
- BLUEMIX_USERNAME='jonathan.dekhtiar@utc.fr'
- BLUEMIX_API_GATEWAY='https://api.eu-gb.bluemix.net'
- BLUEMIX_API_ORGANISATION='FeedCrunch'
- BLUEMIX_API_SPACE='prod'
- USE_RABBITMQ='False'
### == CODECOV_TOKEN === ###
- secure: "sRuP0d5h9pZRVHMo+8TjOdx80rJEb9GiR26uEM2dZZvm3oh+jfHbiqSecaLa3yo6qgyLwz3doSZx1eu7ZW6RDujEHHSg/SdHkosLzo3qKE1Mr5XPJXLtwjXcvSVYhiMVS5E/IcrOKqEi5p694GsykLwz5jVb6orCh/O8UcHHb2NP99JhKWcxFRjEpPoitNmTcigd1VJjqf7MiMq8+GqEhe4vug9XCnyUgpU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bxZViQDr2wXb5Xe16uCpF013P1oPFHTlm2SbrLRidz96jQFWbOj/ktaBEJV1yeFaqdTbEOJd6Jb83NyNrg/pM1ArTpgCw4PYbI7p4ZjlMd9yjYa8zPok9jYuUJj5dHF2l3Ys/M62HkyYdYRRx9v1iZQ5E2x7Xg7eIMWeTguFPqUX24NX/kskAFAfDtU/P994c7MzhoK635Fvmz9R9nr1fRIvZndWwx18XWAYEZp2RW9TEJwbKrwzarmooc8ttDDfjR4aiGJ/yWN2hudUXwUfhD4y0F0VA7jpNmSYm7SrVRV7U8b6+UfcEGNldXlA5lGNIkyOT55O0NGBye87/pHdPV17ESZiR6d6kn20JDlfjnzFctQkFWTN6bAzXq0SptQT2I8YqV1eawFvnjJlbxWfVB5/zjz19cwrqIy8NhQSYtpwiVCf2q95sEpBYaGwbYRMxjbJVMc="
before_deploy:
- find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
- rm -rf venv/
- rm -rf application/staticfiles/
- rm -rf htmlcov/
- if [ -n "$TRAVIS_TAG" ]; then
zip -r "$ARTIFACT_NAME" . -x _unused_/\* certificate/\* example_files/\* scripts/\* .git/\*;
fi
deploy:
- provider: cloudfoundry
api: "$BLUEMIX_API_GATEWAY"
username: "$BLUEMIX_USERNAME"
password: "$BluemixPassword"
organization: "$BLUEMIX_API_ORGANISATION"
space: "$BLUEMIX_API_SPACE"
manifest: manifest.yml
region: eu-gb
on:
branch: master
python: '3.6'
repo: DEKHTIARJonathan/FeedCrunch.IO
- provider: cloudfoundry
api: https://api.eu-gb.bluemix.net
username: jonathan.dekhtiar@utc.fr
password: "$BluemixPassword"
organization: FeedCrunch
space: prod
manifest: manifest-dev.yml
region: eu-gb
on:
branch: dev
python: '3.6'
repo: DEKHTIARJonathan/FeedCrunch.IO
- provider: releases
api_key: "$GITHUB_OAUTH_TOKEN"
file: "$ARTIFACT_NAME"
skip_cleanup: true
on:
tags: true
python: '3.6'
repo: DEKHTIARJonathan/FeedCrunch.IO