https://github.com/sagemathinc/cocalc
Raw File
Tip revision: ce96efdefa19a3360caed158d3a47870a4c9d2ab authored by John Jeng on 22 January 2016, 22:18:04 UTC
Edit syntax
Tip revision: ce96efd
.travis.yml
# SageMathCloud Travis-CI Configuration File
language: node_js

# caching not available, but this should work if it is running in container mode
# container mode disables "sudo", but we need it as long as rethinkdb isn't preinstalled
cache:
  apt: true
#  directories:
#  - salvus/node_modules

# SMC breaks on iojs
node_js:
  - "0.12"
#  - "0.11"
#  - "iojs"

# Travis supports "global" and "build matrix" variables
# http://docs.travis-ci.com/user/environment-variables/
env:
  matrix:
    - MODE=server
    # - MODE=client

# Installation and setup
before_script:
  # rethinkdb installation according to http://www.rethinkdb.com/docs/install/ubuntu/
  - source /etc/lsb-release
  - echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
  - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
  - sudo apt-get update -qq
  # besides rethinkdb, we need at least python-yaml
  - sudo apt-get install rethinkdb python-yaml --force-yes
  - rethinkdb --version
  - rethinkdb --daemon
  # the setup & compilation of SMC
  - cd salvus
  - source salvus-env
  - npm install
  - npm run make

# This is the actual testing, which runs in the same directory where `before_script` did end up in.
# A non-zero exit code indicates a failure.
# npm test is the usual, but we also run coverage reporting
script:
  - if [[ $MODE = "server" ]]; then npm run test-list; fi
#  - if [[ $MODE = "server" ]]; then npm run coveralls; fi
#  - if [[ $MODE = "client" ]]; then echo "insert client testing command here" ; fi

# send coverage report over to https://coveralls.io
#after_success:
#  - if [[ $MODE = "server" ]]; then sh -c 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls'; fi

notifications:
  slack:
    rooms:
      - sagemath:imLn6eVwpZSOBCWBIKu97HXx#dev
back to top