forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
104 lines (103 loc) · 3.52 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
language: node_js
services:
- docker
- mongodb
branches:
only:
- develop
- "/^\\d+\\.\\d+\\.\\d+(-rc\\.\\d+)?$/"
git:
depth: 1
node_js:
- '8'
addons:
apt:
sources:
- google-chrome
- ubuntu-toolchain-r-test
packages:
- google-chrome-stable
- g++-4.8
firefox: "latest"
before_cache:
- rm -rf $HOME/build/RocketChat/Rocket.Chat/.meteor/local/log
- rm -rf $HOME/build/RocketChat/Rocket.Chat/.meteor/local/run
- rm -rf $HOME/build/RocketChat/Rocket.Chat/.meteor/local/db
cache:
directories:
- "$HOME/node_modules"
- "$HOME/.meteor"
- "$HOME/.npm"
- "$HOME/.node-gyp"
- "$HOME/build/RocketChat/Rocket.Chat/node_modules"
- "$HOME/build/RocketChat/Rocket.Chat/.meteor/local"
- "$HOME/build/RocketChat/Rocket.Chat/packages/rocketchat-livechat/.npm"
- "$HOME/build/RocketChat/Rocket.Chat/packages/rocketchat-livechat/.app/node_modules"
- "$HOME/build/RocketChat/Rocket.Chat/packages/rocketchat-livechat/.app/.meteor/local"
before_install:
- if [ ! -e "$HOME/.meteor/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi
# Start X Virtual Frame Buffer for headless testing with real browsers
- .scripts/start-xvfb.sh
install:
- export PATH="$HOME/.meteor:$PATH"
before_script:
- if [[ $TRAVIS_TAG ]]; then meteor reset; fi
- echo "replication:" | sudo tee -a /etc/mongod.conf
- |-
echo " replSetName: \"rs0\"" | sudo tee -a /etc/mongod.conf
- sudo service mongod restart
- mkdir /tmp/build
- meteor --version
- travis_retry meteor npm install
- |-
mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
- meteor npm run lint
- meteor npm run testunit
- travis_retry meteor build --headless /tmp/build
- mkdir /tmp/build-test
- tar -xf /tmp/build/Rocket.Chat.tar.gz -C /tmp/build-test/
- cd /tmp/build-test/bundle/programs/server
- npm install
- cd -
- mongo --eval 'rs.status()'
- mongo meteor --eval 'db.getCollectionNames()'
script:
- travis_retry npm test
- mongo meteor --eval 'db.dropDatabase()'
- unset MONGO_OPLOG_URL
- travis_retry npm test
before_deploy:
- source ".travis/setartname.sh"
- source ".travis/setdeploydir.sh"
- ".travis/setupsig.sh"
- ".travis/namefiles.sh"
deploy:
- provider: s3
access_key_id: AKIAIKIA7H7D47KUHYCA
secret_access_key: "$ACCESSKEY"
bucket: download.rocket.chat
skip_cleanup: true
upload_dir: build
local_dir: "$ROCKET_DEPLOY_DIR"
on:
condition: "$TRAVIS_PULL_REQUEST=false"
all_branches: true
# - provider: releases
# api-key: "$GITHUB_TOKEN"
# file_glob: true
# file: build/*
# skip_cleanup: true
# on:
# tags: true
after_deploy:
- ".travis/docker.sh"
- ".travis/update-releases.sh"
- ".travis/snap.sh"
env:
global:
- DISPLAY=:99.0
- CXX=g++-4.8
- secure: HrPOM5sBibYkMcf9aeQThYPCDiXeLkg0Xgv0HvH88/ku/gphDpNEjHNReHZM3cyfm9y3RhHpVdD+Zzy38S2goKyewRzpXJsuyerOYkjND0v3tivhs9CAX8PAUxj1U5zllTyH4bgW2ZwRtNnwnmtIM/JJlnySMpKVDqIZBpbhn3ph9bJ2J+BW3D3Jw8meQ1vCX8szIibyJK/5QX6HG2RBFXJGYoQ8DmR8jQv0aJQvT1Az5DO4yImk8tX4NP95qOc19Jywr1DsbaSBZeJ8lFJAmBpIGx7KAmUVCcxSxfbXGRhs2K4iEYb3rJ/dU6KiyPsKGUG4aYNGgbvcX0ZxX/BZ6ZU9ff0E4IIf43IxoN3ElrOqOFk5msJAXbrJEreINSzDqKOy8NFYtCQ49E2gwzfage4ZXkhFyx3wMPa5bzpr3ncsTceMjMVz03uL781X6NLuCkUmXv+n8K2MNhJU9Xinpdx1GRJm+0lXJspNNJ1ruHeJtls4epj4bmCwKmmZbFKPXqa5e8xVcMIkwt1LMiHduhE+WgKNHdOMhXrCcTxF62ybLlsHXmyLLJeNjTeKS8QG2XSoonClDAz/1R41I1DsMPblcgz9uvYCf7UtyftbhJ83bnJeEmOYQiwijLG0+QMq+B2+mmZan3Z7Hl7O53dnwuLxz7EO7EhQhY+CqHVgc6s=
- MONGO_OPLOG_URL: "mongodb://localhost:27017/local"
- MONGO_URL: "mongodb://localhost:27017/meteor"
- TEST_MODE: "true"