mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +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"
|
||||
- "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:
|
||||
email: false
|
||||
|
|
|
|||
|
|
@ -1,15 +1,32 @@
|
|||
task :ci do |t|
|
||||
ENV['RAILS_ENV'] ||= "test"
|
||||
namespace :ci do
|
||||
desc 'Continuous integration tests, without features'
|
||||
task :lite do
|
||||
ENV['RAILS_ENV'] ||= "test"
|
||||
|
||||
# test coverage from codeclimate
|
||||
require "codeclimate-test-reporter"
|
||||
CodeClimate::TestReporter.start
|
||||
puts 'Running "lite" test suite'
|
||||
|
||||
# local test coverage
|
||||
require 'simplecov'
|
||||
SimpleCov.start 'rails'
|
||||
[:environment, 'db:create', 'test:all'].each do |t|
|
||||
Rake::Task[t].invoke
|
||||
end
|
||||
end
|
||||
|
||||
[:environment, 'db:create', 'test:all', 'cucumber'].each do |t|
|
||||
Rake::Task[t].invoke
|
||||
desc 'Continuous integration tests, including features'
|
||||
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
|
||||
|
||||
desc 'Alias for ci:full'
|
||||
task :ci => 'ci:full'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue