-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
50 lines (43 loc) · 1.3 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
language: python
env:
global:
- DB_USERNAME=$RDSNAME
- DB_PASSWORD=$RDSPW
- DB_HOST=$RDSHOST
- AWS_ACCESS_KEY_ID=$S3_ACCESSKEYID
- AWS_SECRET_ACCESS_KEY=$S3_SECRETACCESSKEY
python:
- "3.7"
install:
- pip install -r backend/requirements.txt
# - cd frontend && npm install && yarn build && cd ..
- if [ "$TRAVIS_BRANCH" = "main" ]; then echo 'export const API_ENDPOINT = "https://nyuinterviewapp.com";' > frontend/src/Components/api.js; else echo 'export const API_ENDPOINT = "https://nyuinterviewappdevelop.com";' > frontend/src/Components/api.js; fi
script:
- coverage run backend/manage.py test backend
- black --check backend
- flake8 backend
after_script:
- cd $TRAVIS_BUILD_DIR
- coveralls
before_deploy:
- cd backend
deploy:
- provider: elasticbeanstalk
access_key_id: $ACCESSKEYID
secret_access_key: $SECRETACCESSKEY
region: "us-east-1"
app: $EBAPPNAME
env: $EBENVNAME
bucket_name: "elasticbeanstalk-us-east-1-076563148632"
on:
repo: gcivil-nyu-org/INET-Wednesday-Spring2023-Team-3
branch:
- $BRANCHNAME
- provider: s3
access_key_id: $ACCESSKEYID
secret_access_key: $SECRETACCESSKEY
bucket: $BUCKETNAME
local_dir: $TRAVIS_BUILD_DIR/frontend/build
skip_cleanup: true
on:
branch: $BRANCHNAME