mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
On Travis, restrict Cucumber tests to MySQL builds
This commit is contained in:
parent
fe359cf52e
commit
a6f9be2d84
2 changed files with 28 additions and 11 deletions
|
|
@ -21,7 +21,7 @@ before_script:
|
||||||
- "sh -e /etc/init.d/xvfb start"
|
- "sh -e /etc/init.d/xvfb start"
|
||||||
- "cp config/site.yml.tmpl config/site.yml"
|
- "cp config/site.yml.tmpl config/site.yml"
|
||||||
|
|
||||||
script: "bin/rake ci"
|
script: "if [[ $DATABASE_URL == mysql* ]]; then bundle exec rake ci:full; else bundle exec rake ci:lite; fi"
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,32 @@
|
||||||
task :ci do |t|
|
namespace :ci do
|
||||||
ENV['RAILS_ENV'] ||= "test"
|
desc 'Continuous integration tests, without features'
|
||||||
|
task :lite do
|
||||||
|
ENV['RAILS_ENV'] ||= "test"
|
||||||
|
|
||||||
# test coverage from codeclimate
|
puts 'Running "lite" test suite'
|
||||||
require "codeclimate-test-reporter"
|
|
||||||
CodeClimate::TestReporter.start
|
|
||||||
|
|
||||||
# local test coverage
|
[:environment, 'db:create', 'test:all'].each do |t|
|
||||||
require 'simplecov'
|
Rake::Task[t].invoke
|
||||||
SimpleCov.start 'rails'
|
end
|
||||||
|
end
|
||||||
|
|
||||||
[:environment, 'db:create', 'test:all', 'cucumber'].each do |t|
|
desc 'Continuous integration tests, including features'
|
||||||
Rake::Task[t].invoke
|
task :full do |t|
|
||||||
|
puts 'Running full test suite'
|
||||||
|
|
||||||
|
# test coverage from codeclimate
|
||||||
|
require "codeclimate-test-reporter"
|
||||||
|
CodeClimate::TestReporter.start
|
||||||
|
|
||||||
|
# local test coverage
|
||||||
|
require 'simplecov'
|
||||||
|
SimpleCov.start 'rails'
|
||||||
|
|
||||||
|
['ci:lite', 'cucumber'].each do |t|
|
||||||
|
Rake::Task[t].invoke
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc 'Alias for ci:full'
|
||||||
|
task :ci => 'ci:full'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue