forked from GoogleCloudPlatform/android-docs-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
38 lines (35 loc) · 1.73 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
# 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.
machine:
java:
version: openjdk8
dependencies:
pre:
- sudo apt-get update
- echo "${KEYFILE}" > "${HOME}/service_account.json"
- sudo /opt/google-cloud-sdk/bin/gcloud -q components update app-engine-java
- gcloud -q auth activate-service-account --key-file "${HOME}/service_account.json" || true
- gcloud -q config set project "${GOOGLE_PROJECT_ID}"
- sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe"
&& sudo apt-get update
&& sudo apt-get install -t trusty-backports shellcheck
# Install Android SDK, tools, and build tools API 26
- echo "y" | android update sdk --no-ui --all --filter "tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository"
- android list sdk -a
- echo "y" | "${ANDROID_HOME}/tools/bin/sdkmanager" "platforms;android-26" "tools" "build-tools;26.0.1" "build-tools;25.0.3"
- java -version
test:
override:
- export GOOGLE_VERSION_ID="cirlce-${CIRCLE_BUILD_NUM}"
- export GOOGLE_APPLICATION_CREDENTIALS="/home/ubuntu/service_account.json"
- bash run-tests.sh