mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
test all adapters in travis run.
This commit is contained in:
parent
6a64860486
commit
3e3e9055c0
15 changed files with 38 additions and 39 deletions
|
@ -5,11 +5,6 @@ rvm:
|
|||
- 2.0.0
|
||||
- 2.1
|
||||
- 2.2
|
||||
script:
|
||||
- bundle exec rspec
|
||||
- bundle exec cucumber
|
||||
gemfile:
|
||||
- Gemfile
|
||||
before_install:
|
||||
- | # cached install of Neo4j locally:
|
||||
if [ ! -d neo4j-community-2.3.3/bin ];
|
||||
|
@ -20,9 +15,7 @@ before_install:
|
|||
fi
|
||||
before_script:
|
||||
- neo4j-community-2.3.3/bin/neo4j start
|
||||
- mysql -e 'create database database_cleaner_test;'
|
||||
- psql -c 'create database database_cleaner_test;' -U postgres
|
||||
- cp db/sample.config.yml db/config.yml
|
||||
- bin/setup
|
||||
services:
|
||||
- redis-server
|
||||
- mongodb
|
||||
|
|
15
Rakefile
15
Rakefile
|
@ -6,7 +6,6 @@ require 'rake'
|
|||
require 'rspec/core'
|
||||
require 'rspec/core/rake_task'
|
||||
RSpec::Core::RakeTask.new(:spec) do |spec|
|
||||
|
||||
spec.pattern = FileList['spec/**/*_spec.rb']
|
||||
end
|
||||
|
||||
|
@ -15,15 +14,19 @@ RSpec::Core::RakeTask.new(:rcov) do |spec|
|
|||
spec.rcov = true
|
||||
end
|
||||
|
||||
begin
|
||||
require 'cucumber/rake/task'
|
||||
Cucumber::Rake::Task.new(:features)
|
||||
rescue LoadError
|
||||
puts "Cucumber is not available. In order to run features, you must: sudo gem install cucumber"
|
||||
|
||||
desc "Run adapter test suites"
|
||||
task :adapters do
|
||||
Dir["adapters/*"].each do |adapter_dir|
|
||||
Dir.chdir adapter_dir do
|
||||
sh "bundle exec rake"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
task :default => [:spec, :features]
|
||||
|
||||
task :default => [:spec, :features, :adapters]
|
||||
|
||||
desc "Cleans the project of any tmp file that should not be included in the gemspec."
|
||||
task :clean do
|
||||
|
|
|
@ -3,6 +3,6 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
cp spec/support/sample.config.yml spec/support/config.yml
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -94,7 +94,6 @@ DEPENDENCIES
|
|||
bundler (~> 1.16)
|
||||
database_cleaner!
|
||||
database_cleaner-data_mapper!
|
||||
dm-migrations
|
||||
dm-sqlite-adapter
|
||||
rake (~> 10.0)
|
||||
rspec (~> 3.0)
|
||||
|
|
|
@ -3,6 +3,6 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
cp spec/support/sample.config.yml spec/support/config.yml
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,5 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
|
@ -3,6 +3,6 @@ set -euo pipefail
|
|||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle install
|
||||
bundle check || bundle install
|
||||
cp spec/support/sample.config.yml spec/support/config.yml
|
||||
|
||||
# Do any other automated setup that you need to do here
|
||||
|
|
12
bin/setup
Executable file
12
bin/setup
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
set -vx
|
||||
|
||||
bundle check || bundle install
|
||||
cp spec/support/sample.config.yml spec/support/config.yml
|
||||
|
||||
for adapter in adapters/*; do
|
||||
(cd $adapter && bin/setup)
|
||||
done
|
||||
|
Loading…
Reference in a new issue