forked from PolymerLabs/arcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (74 loc) · 3.76 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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="
# todo: remove this once travis fixes their upstream issue (travis-ci/travis-ci#8836)
sudo: required
addons:
chrome: stable
# 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
script:
# Run ktlint against every kotlin file in the diff between the branch and master's head.
- git diff --name-only --relative $TRAVIS_COMMIT_RANGE | grep '\.kt[s"]\?$' | xargs ktlint --android --relative --verbose .
# Bazel build & test everything. Can't use `bazel build ...` yet, because
# javaharness doesn't build on Travis (needs working Android SDK).
- >
bazel build --noshow_progress --noshow_loading_progress
//particles/...
//src/...
//src_kt/...
- >
bazel test --noshow_progress --noshow_loading_progress --test_output=errors
//particles/...
//src/...
//src_kt/...
- ./tools/sigh
- npm run test-extension
- npm run build:rollup
- npm --prefix=server test
cache:
npm: true
# Thinking about adding install steps? Why not modify the tools/setup script instead?
# The list command dumps the top-level packages with their versions, in case we need that for debugging.
install:
- ./tools/setup
- npm list --depth=0
before_deploy:
# build apidocs
- cd ${TRAVIS_BUILD_DIR} && npm run build:typedoc
# Travis pages deploys skips artifacts from .gitignore. We need some of those, so
# remove them from .gitignore.
- cd ${TRAVIS_BUILD_DIR} && sed -i.sedbackup -e '/^shells\/env\/build$/d' .gitignore
- cd ${TRAVIS_BUILD_DIR} && sed -i.sedbackup -e '/^build$/d' .gitignore
- cd ${TRAVIS_BUILD_DIR} && sed -i.sedbackup -e '/^devtools\/deps$/d' .gitignore
- cd ${TRAVIS_BUILD_DIR} && sed -i.sedbackup -e '/^\*\*\/dist$/d' .gitignore
- cd ${TRAVIS_BUILD_DIR} && git log -n 1 > VERSION
# remove an inaccurate README from arcs-live
- cd ${TRAVIS_BUILD_DIR} && rm README.md
# Temporarily push node_modules to arcs-live,
# with the exception of exe files as Github complains about them.
- cd ${TRAVIS_BUILD_DIR} && sed -i.sedbackup -e 's/^\*\*\/node_modules$/\*\*\/node_modules\/\*\*\/\*\.exe/' .gitignore
- cd ${TRAVIS_BUILD_DIR} && rm -f server/node_modules/arcs
# Configure for live.arcs.dev domain name and default web-shells redirect
- cd ${TRAVIS_BUILD_DIR} && echo "live.arcs.dev" > CNAME
- cd ${TRAVIS_BUILD_DIR} && echo '<head><meta http-equiv="refresh" content="0;/shells/web-shell/"></head>' > index.html
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