test all adapters in travis run.

This commit is contained in:
Micah Geisel 2018-05-25 19:41:12 -07:00
parent 6a64860486
commit 3e3e9055c0
15 changed files with 38 additions and 39 deletions

View file

@ -5,11 +5,6 @@ rvm:
- 2.0.0 - 2.0.0
- 2.1 - 2.1
- 2.2 - 2.2
script:
- bundle exec rspec
- bundle exec cucumber
gemfile:
- Gemfile
before_install: before_install:
- | # cached install of Neo4j locally: - | # cached install of Neo4j locally:
if [ ! -d neo4j-community-2.3.3/bin ]; if [ ! -d neo4j-community-2.3.3/bin ];
@ -20,9 +15,7 @@ before_install:
fi fi
before_script: before_script:
- neo4j-community-2.3.3/bin/neo4j start - neo4j-community-2.3.3/bin/neo4j start
- mysql -e 'create database database_cleaner_test;' - bin/setup
- psql -c 'create database database_cleaner_test;' -U postgres
- cp db/sample.config.yml db/config.yml
services: services:
- redis-server - redis-server
- mongodb - mongodb

View file

@ -6,7 +6,6 @@ require 'rake'
require 'rspec/core' require 'rspec/core'
require 'rspec/core/rake_task' require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec| RSpec::Core::RakeTask.new(:spec) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb'] spec.pattern = FileList['spec/**/*_spec.rb']
end end
@ -15,15 +14,19 @@ RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.rcov = true spec.rcov = true
end end
begin
require 'cucumber/rake/task' require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) 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 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." desc "Cleans the project of any tmp file that should not be included in the gemspec."
task :clean do task :clean do

View file

@ -3,6 +3,6 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx 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

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -94,7 +94,6 @@ DEPENDENCIES
bundler (~> 1.16) bundler (~> 1.16)
database_cleaner! database_cleaner!
database_cleaner-data_mapper! database_cleaner-data_mapper!
dm-migrations
dm-sqlite-adapter dm-sqlite-adapter
rake (~> 10.0) rake (~> 10.0)
rspec (~> 3.0) rspec (~> 3.0)

View file

@ -3,6 +3,6 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx 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

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,5 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx set -vx
bundle install bundle check || bundle install
# Do any other automated setup that you need to do here

View file

@ -3,6 +3,6 @@ set -euo pipefail
IFS=$'\n\t' IFS=$'\n\t'
set -vx 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
View 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