forked from travis-ci/travis-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
76 lines (64 loc) · 1.92 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
---
language: node_js
node_js: 6
env:
global:
- PERCY_ENABLE=0
matrix:
- EMBER_VERSION=default
- EMBER_VERSION=beta
- EMBER_VERSION=canary
matrix:
allow_failures:
- env: EMBER_VERSION=beta
- env: EMBER_VERSION=canary
fast_finish: true
sudo: false
dist: trusty
cache:
directories:
- node_modules
- bower_components
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
install:
- npm install -g bower
- npm install
- bower install
before_script:
- if [ "$EMBER_VERSION" = 'default' ] && [ $TRAVIS_PULL_REQUEST = 'false' ]; then echo "Enabling Percy on push with default Ember" && export PERCY_ENABLE=1; fi
- echo $PERCY_ENABLE
script:
- ember try:one $EMBER_VERSION --skip-cleanup=true --- ember test --reporter dot
before_deploy:
- ASSETS_HOST=https://s3.amazonaws.com/travis-error-pages ember build --env production
# delete some of the stuff that's useless for maintenance page
- rm -fr dist/assets/*.js dist/images/emoji dist/index.html dist/images/sponsors
- cp dist/maintenance.html dist/index.html
deploy:
- provider: s3
access_key_id: $MAINTENANCE_S3_ACCESS_KEY_ID
secret_access_key: $MAINTENANCE_S3_SECRET_ACCESS_KEY
bucket: travis-error-pages
skip_cleanup: true
acl: public_read
local_dir: dist
region: us-east-1
on:
branch: master
condition: "$EMBER_VERSION = default"
- provider: script
skip_cleanup: true
script: ./config/deployment/deploy-test-master.sh
on:
branch: master
condition: "$EMBER_VERSION = beta"
- provider: script
skip_cleanup: true
script: ./config/deployment/deploy-test-master.sh
on:
branch: master
condition: "$EMBER_VERSION = canary"
after_success:
- "test $EMBER_VERSION == 'default' && test $TRAVIS_PULL_REQUEST && test $TRAVIS_PULL_REQUEST != 'false' && $TRAVIS_SECURE_ENV_VARS == 'true' && ./config/deployment/deploy-pull-request.sh"