forked from GoogleCloudPlatform/nodejs-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
121 lines (116 loc) · 4.55 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
117
118
119
120
121
# 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.10.2
services:
- redis
- memcached
# 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/nodejs-repo-tools
- yarn install
- yarn run lint
- samples test install -l=endpoints/getting-started-grpc
- 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
- samples test install -l=vision
cache_directories:
- ~/.cache/yarn
- endpoints/getting-started-grpc/node_modules
- 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
- vision/node_modules
# Run your tests
test:
override:
- nyc --cache ava --verbose -T 1m 'endpoints/**/system-test/**/*.test.js'
- nyc --cache ava --verbose -T 30s 'functions/**/test/**/*.test.js'
- nyc --cache ava --verbose -T 2m 'vision/system-test/**/*.test.js'
post:
- nyc report --reporter=lcov > coverage.lcov && codecov || true
deployment:
tests:
branch: /.*/
owner: GoogleCloudPlatform
commands:
- node scripts/build "appengine/analytics"
- node scripts/build "appengine/cloudsql" -- --test-args "run unit-test"
- 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 "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: Update repo tools to accept list of environment variables that must
# be set for the build to work.
# - node scripts/build "endpoints/getting-started-grpc"
- node scripts/build "kms"
- node scripts/build "language"
- 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"
- node scripts/build "trace"
- node scripts/build "translate"
# TODO: This build times out. Does video need more than 10 minutes?
# - node scripts/build "video"
# TODO: Repo tools doesn't support Redis in build container yet.
# When this is done, remove Vision from main system tests.
# - node scripts/build "vision"