openaustralia/publicwhip

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: ruby
dist: focal

before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -y tidy
  - gem install bundler

before_script:
  # TODO: Reinstate brakeman as soon as we've upgrade to rails 5.2
  # - bundle exec brakeman -z
  - cp config/secrets.yml.example config/secrets.yml
  - cp config/database.travis.yml config/database.yml
  - bundle exec rake db:create
  - bundle exec rake db:schema:load
  # But we want to have an empty test database to start with (not populated by seeds.rb)
  - bundle exec rake db:test:prepare
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  - ./cc-test-reporter -d before-build

script:
  - bundle exec rake
  # Also fail if rubocop is unhappy
  - bundle exec rubocop

after_script:
  - ./cc-test-reporter -d after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT

services:
  - mysql