-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
58 lines (52 loc) · 1.73 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
language: python
os: linux
dist: focal
python:
- 3.8
jobs:
- name: test, check format, check lint and report coverage
install:
- cd furbaby && pip install -r requirements.txt
- export GIT_COMMIT_SHORT_HASH=$(git rev-parse --short HEAD)
- export GIT_COMMIT_HASH=$(git rev-parse HEAD)
- echo $GIT_COMMIT_HASH
- echo $GIT_COMMIT_SHORT_HASH
- export AWS_SECRET_ACCESS_KEY="$AWS_ACCESS_SECRET_KEY"
- export AWS_BUCKET_NAME="elasticbeanstalk-us-east-1-994011800090"
script:
- printenv > ./furbaby/.env
- ls -lah ./furbaby
- git add .
- git commit -m "add latest .env file"
- black --check .
- pylint **/*.py --exit-zero
- coverage run --source=api manage.py test --keepdb
- coverage report
after_script:
- export CI_NAME=travis-ci
- export CI_BUILD_NUMBER=$TRAVIS_BUILD_ID
- export CI_BUILD_URL=$TRAVIS_BUILD_WEB_URL
- export CI_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
- export CI_PULL_REQUEST=$TRAVIS_PULL_REQUEST
- curl -sL https://coveralls.io/coveralls-linux.tar.gz | tar -xz && ./coveralls
deploy:
- provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_ACCESS_SECRET_KEY
skip_cleanup: true
region: "us-east-1"
app: "project-team-1-furbaby"
env: "staging"
bucket: $AWS_BUCKET_NAME
on:
branch: develop
- provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_ACCESS_SECRET_KEY
region: "us-east-1"
app: "project-team-1-furbaby"
env: "production"
bucket: $AWS_BUCKET_NAME
skip_cleanup: true
on:
branch: master