sudo: required
dist: trusty
language: ruby
cache: bundler
rvm:
  - 2.5.0@osem --ignore-gemsets
branches:
  only:
    - master
before_install:
  - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
  - "echo `phantomjs -v`"
addons:
  mariadb: '10.2'
notifications:
  email:
    on_success: change
    on_failure: change
  irc:
    channels:
      - "chat.freenode.net#osem"
    on_success: change
    on_failure: change
before_script:
  - cp config/database.yml.travis config/database.yml
  - cp config/secrets.yml.example config/secrets.yml
  - mysql -u root -e 'create database osem_test;'
  - RAILS_ENV=test bundle exec rake db:schema:load --trace
script:
  - "./travis_script.sh $TEST_SUITE"
env:
  global:
    - CI_NODE_TOTAL=4
    - TEST_SUITE=rspec
  matrix:
    - TEST_SUITE=linters
    - CI_NODE_INDEX=0
    - CI_NODE_INDEX=1
    - CI_NODE_INDEX=2
    - CI_NODE_INDEX=3
matrix:
  fast_finish: true

sudo: required
dist: trusty
language: ruby
cache: bundler
rvm:
  - 2.5.0@osem --ignore-gemsets
branches:
  only:
    - master
before_install:
  - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc"
  - "echo `phantomjs -v`"
addons:
  mariadb: '10.2'
notifications:
  email:
    on_success: change
    on_failure: change
  irc:
    channels:
      - "chat.freenode.net#osem"
    on_success: change
    on_failure: change
before_script:
  - cp config/database.yml.example config/database.yml
  - cp config/secrets.yml.example config/secrets.yml
  - mysql -u root -e 'create database osem_test;'
  - RAILS_ENV=test bundle exec rake db:schema:load --trace
script:
  - "./travis_script.sh $TEST_SUITE"
env:
  global:
    - CI_NODE_TOTAL=4
    - TEST_SUITE=rspec
    - OSEM_DB_ADAPTER=mysql2
    - OSEM_DB_USER=root
    - OSEM_DB_PASSWORD=''
    - OSEM_DB_HOST=''
    - OSEM_DB_PORT=''
    - OSEM_DB_NAME='osem_test'
  matrix:
    - TEST_SUITE=linters
    - CI_NODE_INDEX=0
    - CI_NODE_INDEX=1
    - CI_NODE_INDEX=2
    - CI_NODE_INDEX=3
matrix:
  fast_finish: true

Use the new database.yml example file in CI
Use the new database.yml example file in CI

12 factor in our CI, what a riot! ;-)
