-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
76 lines (64 loc) · 1.61 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
language: python
python:
- "3.8"
os: linux
env:
global:
- PGVER=12
- PGPORT=5433
- PGUSER=travis
services:
- postgresql
addons:
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
- postgresql-server-dev-12
- postgresql-client-common
- postgresql-common
before_install:
- sudo sed -i -e "/local.*peer/s/postgres/all/" -e "s/peer\|md5/trust/g" /etc/postgresql/*/main/pg_hba.conf
- postgres --version
- sudo pg_ctlcluster 12 main restart
install:
- pip install -r requirements.txt
- pip install black
- pip install flake8
- pip install coverage
- pip install pyyaml
- pip install coveralls
before_script:
- psql -c 'create database rrtestdb;' -U travis
- python manage.py makemigrations
- python manage.py makemigrations rrapp
- python manage.py makemigrations auth
- python manage.py migrate
script:
- black --check . --skip-string-normalization --exclude settings* --extend-exclude migrations*
- flake8 .
- coverage run --source=rrapp,chat manage.py test
after_script:
- coveralls
deploy:
- provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_REGION
app: $AWS_APP_NAME
env: $AWS_ENV_NAME
bucket_name: $AWS_BUCKET_NAME
on:
branch: master
- provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
region: $AWS_REGION
app: $AWS_APP_NAME
env: $AWS_ENV_NAME
bucket_name: $AWS_BUCKET_NAME
on:
branch: develop
after_deploy:
- ./scripts/after_deploy_1.sh