forked from PolymerLabs/arcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (59 loc) · 3.33 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
55
56
57
58
59
60
61
62
63
64
65
66
language: node_js # https://docs.travis-ci.com/user/languages/javascript-with-nodejs/
dist: xenial
env:
global:
# an encrypted 'GITHUB_TOKEN=<token>' for the PolymerLabs/arcs repo
secure: "qFfvf0YAK5NWkH5fj708Z+1qIHtOFrmNhslB+n14rt5J3fJjY0A/4lbLbhx2jACYME+OU2m66maxh5abEZCF4ZGi4zpJa01IUYesTTa3qdM9kozB2TfFcl0d1xffuGpAh9kPchaadCvx/BU9fYFzkd8CLD5mQWCybwqM+6xpoO/KULDXhlcOPGbzg65xmPJANZH+ldH0NgfVLqofeFUg1j0bke1n+7DLf+Oh4ZiYZavciJjhuYx561TkkSEd1gqQGImEfkmKmhz82E8curx6uJW+kD9WagNbLj4FvEsBETIM7BSE8sei2vOVO42OnzvCej+P98IUelEqBS6sTeUNp79f8cC8n7nSYUJwTpshturBFoIFfcVQNoebdaao6gWpnxhUEnsc36AMl0DpIT0DsA9SxZQRjqhAEZmAWmASJMc5t/jWIjmJrqQxDy80HGJPEhIMTOAZfAiFqwyQwYTvJ0tOTW+jk2P9oriLHwi0Pr88uPGD5HWS6ULPoAutQAWMKCYgb5PoOiB8vbUZT9RTXfdLkHLkpw0ICaj5sam2o32CMLm8KZzfNVLJ/kUgdnkYUpC0vo+PGfguiJX8fvZxB06+niljW9iHteqVuoP1tADQwby4jS2ob3eL7TgCGuGk6gQkvHkLmOzlagKeXu1YZ0ow5vq6C+vSEfKEzIDrhXk="
services:
- docker
# todo: remove this once travis fixes their upstream issue (travis-ci/travis-ci#8836)
sudo: required
# We want email to the whole team when the cron build fails. But regular PR
# builds don't trigger email at all (per https://docs.travis-ci.com/user/notifications/#configuring-email-notifications),
# so configuring email notifications should send them only from cron builds.
notifications:
email:
recipients:
on_success: never # default: change
on_failure: always # default: always
# Bazel build & test everything. Can't use `bazel build ...` yet, because
# javaharness doesn't build on Travis (needs working Android SDK).
jobs:
include:
- stage: test
script: tools/run_in_docker "bazel --bazelrc=tools/travis.bazelrc build //src_kt/... && bazel --bazelrc=tools/travis.bazelrc test //src_kt/..."
name: "Bazel: //src_kt/... "
- script: tools/run_in_docker "bazel --bazelrc=tools/travis.bazelrc build //src/... && bazel --bazelrc=tools/travis.bazelrc test //src/..."
name: "Bazel: //src/..."
- script: tools/run_in_docker "bazel --bazelrc=tools/travis.bazelrc build //particles/... && bazel --bazelrc=tools/travis.bazelrc test //particles/... && tools/sigh testShells"
name: "Bazel: //particles/... + testShells"
# run ktlint against every kotlin file in the diff between the branch and master's head.
- script: tools/run_in_docker "git diff --name-only --relative $travis_commit_range | grep '\.kt[s\"]\?$' | xargs ktlint --android --relative --verbose ."
name: "KtLint"
- script: tools/run_in_docker "tools/sigh lint && tools/sigh test"
name: "Sigh lint & test"
- stage: deploy
if: type != pull_request AND branch = master
script: tools/deploy
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
repo: PolymerLabs/arcs-live
target_branch: master
verbose: true
on:
branch: master
# Use travis to cache a Bazel disk-cache.
# This connects to the docker container via a volume mount (`-v /home/travis/disk-cache:/disk-cache/`).
# Bazel will store artifacts here due to the `--disk_cache=/disk-cache/` argument.
cache:
npm: true
# Pulling container from https://hub.docker.com/repository/docker/arcproject/travis-build
before_install:
- docker pull arcsproject/travis-build:latest
- mkdir -p ./disk-cache/
install:
- tools/run_in_docker "npm install"