sudo: required
dist: trusty
language: ruby
cache: bundler
rvm:
  - 2.5.0@osem --ignore-gemsets
branches:
  except:
    - /^depfu/.*$/
before_install:
  - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
  - "echo `phantomjs -v`"
addons:
  chrome: stable
notifications:
  email:
    on_success: change
    on_failure: change
  irc:
    channels:
      - "chat.freenode.net#osem"
    on_success: change
    on_failure: change
before_script:
  - RAILS_ENV=test bundle exec rake db:bootstrap --trace
script:
  - "./travis_script.sh $TEST_SUITE"
env:
  global:
    - OSEM_DB_ADAPTER=sqlite3
    - OSEM_DB_HOST=''
    - OSEM_DB_PORT=''
    - OSEM_DB_NAME='osem_test'
  matrix:
    - TEST_SUITE=ability
    - TEST_SUITE=features
    - TEST_SUITE=linters
    - TEST_SUITE=models
    - TEST_SUITE=controllers
    - TEST_SUITE=rest
matrix:
  fast_finish: true

sudo: required
dist: xenial
addons:
  apt:
    packages:
      - chromium-browser
language: ruby
cache: bundler
rvm:
branches:
  except:
    - /^depfu/.*$/
before_install:
  - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
  - gem install bundler -v $(tail -n 1 Gemfile.lock)
notifications:
  email:
    on_success: change
    on_failure: change
  irc:
    channels:
      - "chat.freenode.net#osem"
    on_success: change
    on_failure: change
before_script:
  - RAILS_ENV=test bundle exec rake db:bootstrap --trace
  - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update
script:
  - "./travis_script.sh $TEST_SUITE"
env:
  global:
    - OSEM_DB_ADAPTER=sqlite3
    - OSEM_DB_HOST=''
    - OSEM_DB_PORT=''
    - OSEM_DB_NAME='osem_test'
  matrix:
    - TEST_SUITE=ability
    - TEST_SUITE=features
    - TEST_SUITE=linters
    - TEST_SUITE=models
    - TEST_SUITE=controllers
    - TEST_SUITE=rest
matrix:
  fast_finish: true

Update CI to ubuntu xenial and chromium
Update CI to ubuntu xenial and chromium

trusty is rather old, living on the edge baby! Also switch to chromium for
testing, the latest google-chrome version has problems to start with webdrivers
(DevToolsActivePort file doesn't exist).
