-
Notifications
You must be signed in to change notification settings - Fork 118
/
.travis.yml
114 lines (104 loc) · 3.37 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
os: linux
dist: trusty
language: node_js
node_js:
- "12"
python:
- "3.6"
addons:
chrome: stable
firefox: "67.0"
branches:
only:
- master
- release
cache:
npm: false
yarn: false
notifications:
email: false
slack:
rooms:
- $SLACK_NOTIFICATION_TOKEN#distribution-alerts
on_pull_requests: true
env:
VERSION: "$TRAVIS_BUILD_NUMBER"
before_install:
- export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY
- export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY
jobs:
include:
- stage: "Test"
name: "Lint"
if: branch = master OR branch = release
script:
- yarn lint
- name: "Unit Tests"
if: branch = master OR branch = release
script:
- yarn test:unit
- name: "Visual Tests Chrome (Internal)"
if: fork = false AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:visual:install
- yarn test:visual:chrome
- kill $EMBED_PID
- name: "Visual Tests Mobile (Internal)"
if: fork = false AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:visual:install
- yarn test:visual:mobile
- kill $EMBED_PID
- name: "Visual Tests Firefox (Internal)"
if: fork = false AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:visual:install
- yarn test:visual:firefox
- kill $EMBED_PID
- name: "Functional Tests Chrome (Internal)"
if: fork = false AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:functional:chrome --record
- kill $EMBED_PID
- name: "Functional Tests Firefox (Internal)"
if: fork = false AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:functional:firefox --record
- kill $EMBED_PID
- name: "Functional Tests Chrome (External)"
if: fork = true AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:functional:chrome
- kill $EMBED_PID
- name: "Functional Tests Firefox (External)"
if: fork = true AND (branch = master OR branch = release)
script:
- yarn start --no-info & export EMBED_PID=$!
- yarn test:functional:firefox
- kill $EMBED_PID
- name: "Deploy"
# Deploy to preview preview URL for testing purposes. Only deploy pull requests to 'release' branch.
if: branch = release
script:
- pip install --user awscli
- aws s3 cp ./dist s3://$AWS_ASSETS_BUCKET/$TRAVIS_COMMIT --recursive --acl public-read
- stage: "Release"
name: "Release to NPM"
if: branch = release AND type = push
script:
- yarn semantic-release
- name: "Release to AWS"
# Deploy to AWS production is done by copying already deployed sources via "Test and Publish" job.
# This allows us to rollback quickly (no building, just copy existing file).
git:
clone: false
if: branch = release AND type = push
script:
- pip install --user awscli
- aws s3 cp s3://$AWS_ASSETS_BUCKET/$TRAVIS_COMMIT s3://$AWS_ASSETS_BUCKET/ --recursive --acl public-read