Skip to content
Snippets Groups Projects
.travis.yml 3.4 KiB
Newer Older
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
language: node_js
services:
Aaron Ogle's avatar
Aaron Ogle committed
- docker
- mongodb
S. Li's avatar
S. Li committed
branches:
westmakaha's avatar
westmakaha committed
  only:
Aaron Ogle's avatar
Aaron Ogle committed
  - develop
  - experimental
  - "/^(\\d+\\.)?(\\d+\\.)?(\\*|\\d+)$/"
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
node_js:
Aaron Ogle's avatar
Aaron Ogle committed
- '4'
Gabriel Engel's avatar
Gabriel Engel committed
addons:
  apt:
    sources:
    - google-chrome
Aaron Ogle's avatar
Aaron Ogle committed
    - ubuntu-toolchain-r-test
Gabriel Engel's avatar
Gabriel Engel committed
    packages:
    - google-chrome-stable
Aaron Ogle's avatar
Aaron Ogle committed
    - g++-4.8
  firefox: "latest"
Gabriel Engel's avatar
Gabriel Engel committed
before_cache:
Aaron Ogle's avatar
Aaron Ogle committed
- 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
Gabriel Engel's avatar
Gabriel Engel committed
cache:
  directories:
Aaron Ogle's avatar
Aaron Ogle committed
  - "$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"
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
before_install:
Gabriel Engel's avatar
Gabriel Engel committed
- 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
Gabriel Engel's avatar
Gabriel Engel committed
install:
Aaron Ogle's avatar
Aaron Ogle committed
- export PATH="$HOME/.meteor:$PATH"
Gabriel Engel's avatar
Gabriel Engel committed
before_script:
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
- echo "replication:" | sudo tee -a /etc/mongod.conf
- |-
  echo "  replSetName: \"rs0\"" | sudo tee -a /etc/mongod.conf
- sudo service mongod restart
Aaron Ogle's avatar
Aaron Ogle committed
- mkdir /tmp/build
Gabriel Engel's avatar
Gabriel Engel committed
- travis_retry meteor npm install
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
- |-
  mongo --eval 'rs.initiate({_id:"rs0", members: [{"_id":1, "host":"localhost:27017"}]})'
Gabriel Engel's avatar
Gabriel Engel committed
- meteor npm run lint
- meteor npm run stylelint
- 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
Gabriel Engel's avatar
Gabriel Engel committed
- meteor npm install -g node-gyp node-pre-gyp
- meteor npm install
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
- mongo --eval 'rs.status()'
- mongo meteor --eval 'db.getCollectionNames()'
Gabriel Engel's avatar
Gabriel Engel committed
- travis_retry meteor npm test
- mongo meteor --eval 'db.dropDatabase()'
- unset MONGO_OPLOG_URL
Gabriel Engel's avatar
Gabriel Engel committed
- travis_retry meteor npm test
before_deploy:
Aaron Ogle's avatar
Aaron Ogle committed
- source ".travis/setartname.sh"
- source ".travis/setdeploydir.sh"
- ".travis/setupsig.sh"
- ".travis/namefiles.sh"
- echo ".travis/sandstorm.sh"
Gabriel Engel's avatar
Gabriel Engel committed
deploy:
Aaron Ogle's avatar
Aaron Ogle committed
  access_key_id: AKIAIKIA7H7D47KUHYCA
  secret_access_key: "$ACCESSKEY"
  bucket: download.rocket.chat
Aaron Ogle's avatar
Aaron Ogle committed
  local_dir: "$ROCKET_DEPLOY_DIR"
    condition: "$TRAVIS_PULL_REQUEST=false"
after_deploy:
Aaron Ogle's avatar
Aaron Ogle committed
- ".travis/docker.sh"
- ".travis/update-releases.sh"
- ".travis/snap.sh"
  - DISPLAY=:99.0
Aaron Ogle's avatar
Aaron Ogle committed
  - CXX=g++-4.8
  - secure: HrPOM5sBibYkMcf9aeQThYPCDiXeLkg0Xgv0HvH88/ku/gphDpNEjHNReHZM3cyfm9y3RhHpVdD+Zzy38S2goKyewRzpXJsuyerOYkjND0v3tivhs9CAX8PAUxj1U5zllTyH4bgW2ZwRtNnwnmtIM/JJlnySMpKVDqIZBpbhn3ph9bJ2J+BW3D3Jw8meQ1vCX8szIibyJK/5QX6HG2RBFXJGYoQ8DmR8jQv0aJQvT1Az5DO4yImk8tX4NP95qOc19Jywr1DsbaSBZeJ8lFJAmBpIGx7KAmUVCcxSxfbXGRhs2K4iEYb3rJ/dU6KiyPsKGUG4aYNGgbvcX0ZxX/BZ6ZU9ff0E4IIf43IxoN3ElrOqOFk5msJAXbrJEreINSzDqKOy8NFYtCQ49E2gwzfage4ZXkhFyx3wMPa5bzpr3ncsTceMjMVz03uL781X6NLuCkUmXv+n8K2MNhJU9Xinpdx1GRJm+0lXJspNNJ1ruHeJtls4epj4bmCwKmmZbFKPXqa5e8xVcMIkwt1LMiHduhE+WgKNHdOMhXrCcTxF62ybLlsHXmyLLJeNjTeKS8QG2XSoonClDAz/1R41I1DsMPblcgz9uvYCf7UtyftbhJ83bnJeEmOYQiwijLG0+QMq+B2+mmZan3Z7Hl7O53dnwuLxz7EO7EhQhY+CqHVgc6s=
Rodrigo Nascimento's avatar
Rodrigo Nascimento committed
  - MONGO_OPLOG_URL: "mongodb://localhost:27017/local"
  - MONGO_URL: "mongodb://localhost:27017/meteor"
  - TEST_MODE: "true"