-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
54 lines (45 loc) · 1.4 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
language: python
os: linux
dist: focal
python:
- "3.11"
install:
- pip install -r requirements.txt
- pip install pillow
before_script:
- python manage.py migrate
- python manage.py collectstatic --noinput
script:
- black --check .
- flake8
- coverage run manage.py test --noinput
after_script:
- coveralls
before_deploy:
- if [ "$TRAVIS_BRANCH" = "master" ]; then cp .ebextensions/django.config.master .ebextensions/django.config; fi
- if [ "$TRAVIS_BRANCH" = "develop" ]; then cp .ebextensions/django.config.dev .ebextensions/django.config; fi
- if [ "$TRAVIS_BRANCH" = "develop" ]; then cat .ebextensions/django.config; fi
- zip -r deploy_package.zip . -x "*.git*" -x "**/__pycache__/*" -x "*.pyc" -x "venv/*"
deploy:
- provider: elasticbeanstalk
access_key_id: $access_key_id
secret_access_key: $secret_access_key
region: "us-west-2"
app: "TutorNYU-dev-branch"
env: "app-env"
bucket_name: "elasticbeanstalk-us-west-2-381492260474"
zip_file: deploy_package.zip
skip_cleanup: true
on:
branch: develop
- provider: elasticbeanstalk
access_key_id: $access_key_id
secret_access_key: $secret_access_key
region: "us-west-2"
app: "TutorNYU-production"
env: "production-env"
bucket_name: "elasticbeanstalk-us-west-2-381492260474"
zip_file: deploy_package.zip
skip_cleanup: true
on:
branch: master