Skip to content

Commit

Permalink
Use docker to run solr
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed May 17, 2017
1 parent 610310f commit 79f2a03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
dist: trusty
language: ruby
sudo: false
sudo: required

notifications:
email: false

services:
- docker

rvm:
- 2.4.1

Expand All @@ -20,6 +24,9 @@ matrix:
before_install:
- gem update --system
- gem install bundler
- docker run --name my_solr -d -p 8983:8983 solr
- docker cp ./solr/conf my_solr:/opt/solr/blacklight-solr-conf
- sleep 10; docker exec -it --user=solr my_solr bin/solr create_core -c blacklight-core -d /opt/solr/blacklight-solr-conf

env:
- "RAILS_VERSION=5.0.3"
Expand Down
11 changes: 4 additions & 7 deletions tasks/blacklight.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@ EngineCart.fingerprint_proc = EngineCart.rails_fingerprint_proc

desc "Run test suite"
task :ci => ['blacklight:generate'] do
SolrWrapper.wrap do |solr|
solr.with_collection(name: 'blacklight-core', dir: File.join(File.expand_path("..", File.dirname(__FILE__)), "solr", "conf")) do
within_test_app do
system "RAILS_ENV=test rake blacklight:index:seed"
end
Rake::Task['blacklight:coverage'].invoke
end
within_test_app do
system "RAILS_ENV=test rake blacklight:index:seed"
end

Rake::Task['blacklight:coverage'].invoke
end

namespace :blacklight do
Expand Down

0 comments on commit 79f2a03

Please sign in to comment.