Repository navigation
Expand file tree
/
Copy path.travis.yml
More file actions
76 lines (59 loc) · 1.7 KB
/
Copy path.travis.yml
File metadata and controls
76 lines (59 loc) · 1.7 KB
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
matrix:
include:
- language: python
python:
- "3.6"
services: mysql
env:
global:
- DJANGO_SETTINGS_MODULE="insurance_backend.settings.init"
- PYTHONPATH="/home/travis/build/tocilla/Insurance/insurance_backend"
- PIP_USE_MIRRORS=true
- ENVIROMENT=travis
matrix:
- DB=mysql
#commands to install dependencies
install:
- cd insurance_backend
- pip install -q -r requirements.txt
before_script:
- mysql -e 'create database travis_ci_db;'
#command to run the test suite
script:
- coverage run --source='.' manage.py test
- coverage report --fail-under 100
- pycodestyle **/*.py
# push the results back to codecov
after_success:
- codecov
before_deploy:
- bash scripts/create_config_profile.sh
deploy:
# deploy to the production
- provider: script
script: bash scripts/deploy.sh
on:
branch: master
- language: node_js
node_js: 'stable'
#install dependencies
install:
- cd insurance_frontend
- npm install
#change base url to production
before_script:
- sed -i "s~http://localhost:8000~$backend_url~" src/services/api.js
#build the application
script:
- npm run build
deploy:
# deploy to the production
provider: s3
access_key_id: $aws_access_key_id
secret_access_key: $aws_secret_access_key
region: $aws_region
bucket: "insurance-frontend-tocilla"
skip_cleanup: true
local_dir: dist
on:
branch: master