language: ruby

sudo: false

services: memcache

rvm:
  - 2.4.7
  - 2.5.7
  - 2.6.5
  - 2.7.0
  - ruby-head

matrix:
  allow_failures:
    - rvm: ruby-head

cache:
  bundler: true
  directories:
    - node_modules

# ignored --deployment option
bundler_args: "--without server --jobs=3 --retry=3"

before_install:
  - "echo 'gemspec' > Gemfile.local"
  - gem update bundler

before_script:
  - npm install

script: if [ $TEST_MODE = "gem" ] ; then bundle exec tdiary test ; else bundle exec rake spec jasmine:ci test ; fi

env:
  - TEST_MODE=rack
  - TEST_MODE=gem

notifications:
  irc: "irc.freenode.org#tdiary"
