-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
114 lines (100 loc) · 3.62 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
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
dist: xenial
language: node_js
git:
# We can't limit git depth because we need to do --since checks
depth: false
branches:
only:
- develop
services:
- docker
addons:
chrome: stable
cache:
- yarn
- directories:
- $HOME/.npm
env:
global:
- TZ=America/New_York
- PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome
- LERNA_SINCE=$(if [ -n "$TRAVIS_PULL_REQUEST_SHA" ]; then echo "$TRAVIS_PULL_REQUEST_SHA^1"; else echo ""; fi)
before_install:
# Travis has a very old version of Yarn installed, so we need to upgrade.
# - npm install -g yarn@`jq -r .engines.yarn package.json`
- npm install -g [email protected]
# npm install -g instead of npx so we don't need to re-unpack every time.
- npm install -g lerna@`jq -r .devDependencies.lerna package.json`
# npm install -g instead of npx so we don't need to re-unpack every time.
- npm install -g apollo
- source scripts/check-for-changes.sh
# Keeps the "node_js" language setting from automatically doing a default "yarn
# install" in cases where we leave it off.
install: skip
jobs:
include:
- name: JavaScript Tests
install:
- if [ -z "$HAS_JS_CHANGES" ]; then travis_terminate 0; fi
- yarn install --frozen-lockfile --ignore-scripts
before_script: yarn prepare
script: >-
npx lerna run
--since=$LERNA_SINCE
--scope "@cityofboston/*"
--scope "services-js.*"
--no-sort
test
after_failure:
- curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
- artifacts upload --target-paths travis/screenshots/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID services-js/*/screenshots
# - name: Percy Snapshots
# install:
# - if [ -z "$HAS_JS_CHANGES" ]; then travis_terminate 0; fi
# - yarn install --frozen-lockfile --ignore-scripts
# before_script: yarn prepare
# script: >-
# npx lerna run
# --since=$LERNA_SINCE
# --scope=@cityofboston/*
# --scope=services-js.*
# --no-sort
# percy
- name: JavaScript Template Tests
install:
- if [ -z "$HAS_TEMPLATE_CHANGES" ]; then travis_terminate 0; fi
- yarn install --frozen-lockfile --ignore-scripts
before_script: npx lerna run --since=$LERNA_SINCE --scope=templates.* --include-filtered-dependencies prepare
script: >-
npx lerna run
--since=$LERNA_SINCE
--concurrency 1
--stream
--scope=templates.*
test
# - name: Ruby Tests
# install:
# - if [ -z "$HAS_RUBY_CHANGES" ]; then travis_terminate 0; fi
# script: >-
# npx lerna run
# --since=$LERNA_SINCE
# --stream
# --scope=services-ruby.*
# test
- stage: deploy
name: Notify Shippy-Toe
if: type IN (push)
install: skip
script: skip
deploy:
provider: script
script:
- npx -p deploy-tools.tgz report-updated-services
on:
branch: develop
notifications:
slack:
on_success: always
on_failure: always
rooms:
secure: nCdLrImWYdmlid3Ij4S7tguVr9EhzvolsHhuUMq3M4x2pP2pvQa+amUEdsBwfOpoCWfd8LWSRIY5eoK7V361yHXYOR9484p2ny1o4/QDSTgtaEFhkBQlfYMvhTZrFZN8slCh2J30gbyvCW23fSpZIAkX3u8MPnGNHduee+lmTtfvKx9phrfLKJBko5kI+4gnOelLMFM0tjjmS4EXRbwhvYsPPwoMuPNOGoYQJAoUsH2WBRMizVMIc/Rtl/L2y0tQ8kBi0KtyEllHZO9ce1RoxFDMuRZzQnd2WsQ13ZN83e4qHeXQYDsLqVjRvjeENoM4RSUROplwTcrJ+AhOamUlSldPrgZYYYSEW4FI61fs4+zwJIP4/vCQk8b6IFA7DVAQz4pXUrZV6NuVZQmtZyTZth7UHIgDpepgFRcBI4tRZQ7W6XhPjGe/6xg0wZ/5K86HdZJG0Tq4B/tDLbu3y069Y2oKZYtCJebFYx45lF3iBCJx/97uJFcclB1rjyg8K0IGjCaraR6BatfLKKkrjg3bfzG643/AupWvYhsqg9Q6LFMtE1kucXmAEYRH/a58MmUjNYFavqsDNPVZ8xi1LEXp171ySd4agaHN/9+ORi2wectIgBZqOldGw80WXeLqP3lfVyRFtW26ZTpoM7jfxbzWiIpX4C7K4QHe4KAy8KTCnQ4=