language: node_js
node_js:
  - "node"

addons:
    apt:
      packages:
        - xvfb

before_install:
  # Virtual display to make Electron happy
  - export DISPLAY=':99.0'
  - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &

install:
  # Install headless browser
  - npm install mocha
  - npm install chai
  - npm install nightmare
  # Install Rust
  - curl -sSf https://build.travis-ci.org/files/rustup-init.sh | sh -s -- --default-toolchain=stable -y
  - export PATH=$HOME/.cargo/bin:$PATH
  - rustc --version
  - cargo --version

before_script:
  # Build and run Polaris server
  - git clone -b rocket http://github.com/agersant/polaris
  - cd polaris
  - cargo build
  - cargo run -- -d test/db.sqlite -w .. &
  - sleep 5
  - cd ..

script:
  - mocha

language: node_js
node_js:
  - "node"

addons:
    apt:
      packages:
        - xvfb

before_install:
  # Virtual display to make Electron happy
  - export DISPLAY=':99.0'
  - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &

install:
  # Install headless browser
  - npm install mocha
  - npm install chai
  - npm install nightmare
  # Install Rust
  - curl -sSf https://build.travis-ci.org/files/rustup-init.sh | sh -s -- --default-toolchain=nightly -y
  - export PATH=$HOME/.cargo/bin:$PATH
  - rustc --version
  - cargo --version

before_script:
  # Build and run Polaris server
  - git clone -b rocket http://github.com/agersant/polaris
  - cd polaris
  - cargo build
  - cargo run -- -d test/db.sqlite -w .. &
  - sleep 5
  - cd ..

script:
  - mocha

Build server with Rust nightly
Build server with Rust nightly

