sudo: false language: ruby cache: bundler: true directories: - $(npm root) - ~/bin script: | ( set -ex if [ -n "$RUBOCOP" ]; then bundle exec rubocop else bundle exec image_optim --info bundle exec rspec fi ) before_install: | ( set -ex if [ -z "$RUBOCOP" ]; then command -v svgo || npm install svgo command -v pngout || { mkdir -p ~/bin curl -L "http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz" | tar -xz -C ~/bin --strip-components 2 --wildcards '*/x86_64/pngout' } fi ) matrix: fast_finish: true include: - env: RAILS_VERSION='~> 3.2' rvm: default - env: RAILS_VERSION='~> 4.0' SPROCKETS_RAILS_VERSION='~> 2.0' rvm: '2' - env: RAILS_VERSION='~> 4.0' rvm: '2' - env: RAILS_VERSION='~> 5.0' SPROCKETS_RAILS_VERSION='~> 2.0' rvm: '2.2.2' - env: RAILS_VERSION='~> 5.0' rvm: '2.2.2' - env: RUBOCOP=true rvm: '2.2.2'