/
.travis.yml
92 lines (83 loc) · 3.56 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
sudo: required
dist: trusty
language: php
php:
- 7.1
before_install:
- openssl aes-256-cbc -K $encrypted_4537e53f71e7_key -iv $encrypted_4537e53f71e7_iv -in scripts/bolt-design-system-bot.private-key.pem.enc -out scripts/bolt-design-system-bot.private-key.pem -d
- nvm install # version lifted from `.nvmrc`
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4
- export PATH="$HOME/.yarn/bin:$PATH"
services:
- docker
# see more conditions: https://docs.travis-ci.com/user/conditions-v1
# Stages run sequentially; the jobs in them run in parallel
stages:
- Prep
- Test Live Site
# Just an example of having a whole stage be branch conditional; see more conditions: https://docs.travis-ci.com/user/conditions-v1
# - name: Super Hard Tests
# if: branch = master
jobs:
include:
- stage: Prep
name: 'Smoke Tests: Install, Lint, Unit'
before_script:
- phpenv config-rm xdebug.ini
- composer global require hirak/prestissimo
- yarn run setup:quick
- ./scripts/check-run-queue.js 'Lint'
- ./scripts/check-run-queue.js 'Unit'
script:
- ./test/lint.js
- ./test/unit.js
- stage: Prep
name: 'Build + Deploy'
script:
- yarn run setup
- ./scripts/check-run-in-progress.js 'Deploy - now.sh'
- yarn run build
- yarn run deploy
# need to reset git repo before `update-read-only-git-repos.sh`
- cd "`git rev-parse --show-toplevel`" && git clean -fd && git reset --hard HEAD && cd -
- ./release/update-read-only-git-repos.sh
- stage: Test Live Site
name: 'Nightwatch End-to-End'
addons:
sauce_connect: true
script:
- yarn run setup
- ./scripts/check-run-in-progress.js 'Nightwatch'
- export NOW_URL=$(./scripts/get-latest-deploy.js)
- echo "The Now URL is $NOW_URL"
- time curl -sSf "$NOW_URL" > /dev/null # warming up site
- npx nightwatch --config nightwatch.js --env chrome,ie11
- sleep 10
- ./scripts/report-nightwatch-results.js
- stage: Test Live Site
name: 'Ensure site is live'
script:
- yarn run setup
- ./scripts/check-run-in-progress.js 'Site is live'
- export NOW_URL=$(./scripts/get-latest-deploy.js)
- echo "Testing Now URL \"$NOW_URL\" to see if it is alive."
- time curl -sSf "$NOW_URL" > /dev/null
after_success:
- ./scripts/check-run-success.js 'Site is live'
after_failure:
- ./scripts/check-run-failure.js 'Site is live'
cache:
yarn: true
directories:
- node_modules
- stage: Test Live Site
name: 'Example master only job'
if: branch = master
script:
- echo "This example only runs on master branch builds"
notifications:
email:
on_success: never
on_failure: never # @todo re-enable
slack:
secure: cNto+gWAoK1JM9jBNG4i4rMSybv3twMbqlFSCohQFBDMwKFMdlyWqFDX6iYKtHxWEDzrZyRz3qiJ8/S44mgjeKJ/xHbHDtPchp/KL2P1htipvwD2EZXobcBEGl83v2rmtFO1WNJUPB3RIJE2yt1wJsX7NIXpDw82hePmaIvNJmtbLpK/J5uaFqGNHIsctmULgVmGSNSTyK4nYxxjNNLd0EvO37Y6VN8FhsKNu2NHMKeeQxinEvETDUh8XuqXZYNWE3PBvVa4OiDhgnr5K27jsnWX+wEmqg0xY+CMf7mUSTqVN61fA7LnHyM0qcGGmB6YTv4QYLMwPydp+nsjDcm3St9D+KOTsQ4ExOaEAL/6EnAEpl8GtxST+ytdqswhCC4yMCO61Hy+M5AoXgDSGrrXHgZakDMAcEVcJdH38791hRxcuM3ldVmHAlAWFdgRLG5rRMVh3qoXz7jbraoTdjyKMegQIQdKR2SX7O9Dv0EEtLz4lTFN2RENvAjLggUPPU+ESoUHmSbwmPGnt7jy3ra2AI3nnYpfn/0e6Op/A3z7HLbdm3XyuNWoTPhy1mc4Adca+HosJ37UPv7nDRIGds1sKYAeWq94+rEk+/6IQ/oRIDRhSYsQbLLWnU6DH4o7iOj7D+X/ngjqmF75nW2s5+7rtdBHFvNzOJalCKHiDTMfdlQ=