-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
42 lines (41 loc) · 959 Bytes
/
.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
sudo: false
language: python
python:
- "3.6"
- "2.7"
addons:
postgresql: "9.6"
services:
- postgresql
branches:
only:
- master
- uat
- staging
- production
env:
global:
- SECRET_KEY=SecretKeyForTravis
- DATABASE_URL="postgis://postgres@localhost:5432/travis_ci_test"
install:
- sudo apt-get install -y postgresql-9.6-postgis-2.3
- psql -U postgres -c "create extension if not exists postgis"
- pip install pip --upgrade
- pip --version
- pip install -r requirements.txt
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- python manage.py migrate --noinput
script:
- python manage.py test
deploy:
provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY
secret_access_key:
secure: "$AWS_SECRET_KEY"
region: "ap-southeast-2"
app: "eb-biosys"
env: "eb-biosys-uat"
bucket_name: $AWS_BUCKET_NAME
on:
branch: uat