generated from cs130-w21/template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
54 lines (46 loc) · 3.01 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: node_js # version is specified in .nvmrc
# we provision a temporary postgres DB to do backend integration tests.
# default user 'postgres' with blank password.
# The travis postgres installation is buggy, so we use docker for this.
services:
- docker
# create database with db name 'integration_test_db'
before_install:
- chmod +x ./ci/run_test_db.sh && ./ci/run_test_db.sh
# install step
install:
- bash -c "cd server && npm install"
- bash -c "cd client && yarn install"
# step to build assets & setup for tests
before_script:
- bash -c "cd client && CI='' yarn run build"
# run our unit and integration tests, and validate test coverage.
# note: FINNHUB_API_KEY is ste in the travis environment.
script:
- bash -c "cd client && yarn run test"
- bash -c "cd server && npm run unit-test"
- FINNHUB_API_KEY=$FINNHUB_API_KEY PG_CONNSTR='postgresql://postgres:@localhost:5432/integration_test_db' bash -c "cd server && npm run integration-test"
- bash -c "cd server && npm run doc" # build documentation
- bash -c "cd server && npm run coverage" # adds html and text coverage, which we will serve in prod. Also enforces code coverage percentages.
# create EB (Elastic Beanstalk) zip bundle to upload to AWS EB.
before_deploy:
- chmod +x ./ci/create-zip-bundle.sh && ./ci/create-zip-bundle.sh
# deploy step (only when branch is master)
deploy:
provider: elasticbeanstalk
access_key_id:
secure: "VfJ5ca4ddG7mKRaAYPoL5KxLfPfJYzhGnkDaqeTC8xZIY6gH+8dcKTxI/x0Coo2sw5EzKZQzDYGeZRCLvFTsSoU6npf/dIRqiL6XVlInO7aGC9suVSI2plTvWOC6YJtMvVdYP8PTp16of/82282NCiZn1gT0L2xSCoxQp3PNbkg94E4pEz6MVJZnZtL1pc2tN0cKfRMK3dC0RaSA6ymU4WycvlABFs/wbJ5ZyJpnrybiYm6iNjhrbIhd4djaxNHlTBh1IvY9+Sgmtuo1C9n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81UXCW5NJ9o="
region: "us-west-1"
app: "stonks"
env: "stonks-env"
bucket_name: "stonks-source"
on:
repo: cs130-w21/19
branch: master
skip_cleanup: true
cleanup: false
zip_file: './eb_bundle.zip'
after_deploy:
- echo "NOTIFY dpeloyment successful."