forked from GoogleCloudPlatform/nodejs-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
116 lines (111 loc) · 4.61 KB
/
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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Copyright 2017, Google, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# See:
#
# https://circleci.com/docs/configuration/
# https://circleci.com/docs/install-and-use-yarn/
machine:
node:
version: 6.11.2
# Use for broader build-related configuration
general:
branches:
ignore:
- gh-pages
# Install your project's language-specific dependencies
dependencies:
override:
- echo $KEYFILE > /home/ubuntu/nodejs-docs-samples/key.json
- gcloud auth activate-service-account --key-file /home/ubuntu/nodejs-docs-samples/key.json || true
- yarn global add ava nyc codecov semistandard @google-cloud/[email protected]
- yarn install
- yarn run lint
- samples test install -l=functions/background
- samples test install -l=functions/datastore
- samples test install -l=functions/errorreporting
- samples test install -l=functions/gcs
- samples test install -l=functions/helloworld
- samples test install -l=functions/http
- samples test install -l=functions/imagemagick
- samples test install -l=functions/log
- samples test install -l=functions/ocr/app
- samples test install -l=functions/pubsub
- samples test install -l=functions/sendgrid
- samples test install -l=functions/slack
- samples test install -l=functions/uuid
cache_directories:
- ~/.cache/yarn
- functions/background/node_modules
- functions/datastore/node_modules
- functions/errorreporting/node_modules
- functions/gcs/node_modules
- functions/helloworld/node_modules
- functions/http/node_modules
- functions/imagemagick/node_modules
- functions/log/node_modules
- functions/ocr/app/node_modules
- functions/pubsub/node_modules
- functions/sendgrid/node_modules
- functions/slack/node_modules
- functions/uuid/node_modules
# Run your tests
test:
override:
- samples test run --cmd nyc -- --cache ava --verbose -T 30s 'functions/**/test/**/*.test.js'
post:
- nyc report --reporter=lcov > coverage.lcov && codecov || true
deployment:
tests:
branch: /.*/
owner: GoogleCloudPlatform
commands:
- node scripts/build "appengine/analytics"
- export SQL_PORT=3306; export INSTANCE_CONNECTION_NAME=$INSTANCE_CONNECTION_PREFIX-mysql; node scripts/build "appengine/cloudsql" -- --test-args "run system-test-proxy"
- export SQL_PORT=5432; export INSTANCE_CONNECTION_NAME=$INSTANCE_CONNECTION_PREFIX-pg; node scripts/build "appengine/cloudsql_postgresql" -- --test-args "run system-test-proxy"
- node scripts/build "appengine/datastore"
- node scripts/build "appengine/endpoints"
- node scripts/build "appengine/errorreporting"
- node scripts/build "appengine/hello-world"
- node scripts/build "appengine/mailjet"
- node scripts/build "appengine/metadata"
- node scripts/build "appengine/static-files"
- GCLOUD_STORAGE_BUCKET=docs-samples-gae-test-$(uuid); node scripts/build "appengine/storage"
- node scripts/build "auth"
- node scripts/build "appengine/pubsub"
- node scripts/build "bigquery"
- node scripts/build "computeengine"
- node scripts/build "containerengine/hello-world"
- node scripts/build "datastore"
- node scripts/build "debugger"
- node scripts/build "dlp"
- node scripts/build "dns"
- node scripts/build "endpoints/getting-started"
# TODO(ace-n): Get this working again
# - node scripts/build "endpoints/getting-started-grpc"
- node scripts/build "error-reporting"
- node scripts/build "iot/manager"
- node scripts/build "kms"
- node scripts/build "language/slackbot"
- node scripts/build "logging"
- node scripts/build "monitoring"
- node scripts/build "prediction"
- node scripts/build "pubsub"
- node scripts/build "resource"
- node scripts/build "spanner"
- node scripts/build "speech"
- node scripts/build "storage-transfer"
- node scripts/build "trace"
- node scripts/build "translate"
# TODO: This build times out. Does video need more than 10 minutes?
# - node scripts/build "video"
- node scripts/build "vision"