-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
25 lines (23 loc) · 816 Bytes
/
circle.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
machine:
node:
version: 8
environment:
GOOGLE_APPLICATION_CREDENTIALS: service-account-key.json
GCLOUD_BIN: "sudo /opt/google-cloud-sdk/bin/gcloud"
test:
pre:
- echo $GOOGLE_APPLICATION_CREDENTIALS_BASE64 | base64 --decode --ignore-garbage > $GOOGLE_APPLICATION_CREDENTIALS
- npm install coveralls
post:
- cp -r testresults $CIRCLE_ARTIFACTS
- cp -r coverage $CIRCLE_ARTIFACTS
- cat ./coverage/lcov.info | npx coveralls
deployment:
staging:
branch: master
commands:
- $GCLOUD_BIN --quiet components install beta
- $GCLOUD_BIN --quiet components update
- $GCLOUD_BIN --quiet config set project $GCP_PROJECT_ID
- $GCLOUD_BIN --quiet auth activate-service-account --key-file=$GOOGLE_APPLICATION_CREDENTIALS &> /dev/null
- npm run deploy