Projects in Repo SubdirectoriesΒΆ

Solano CI supports building a repo that contains multiple projects, each in a subdirectory.

For example, you may have a repo with multiple Ruby gems in it that you install into your app via Bundler’s remote git integration.

Say you have a layout like:

REPO_ROOT/
         /gem1/
              /Gemfile
              /Gemfile.lock
              /Rakefile
              /lib/gem1.rb
              /test/gem1_test.rb
              /gem1.gemspec
         /gem2/
              /Gemfile
              /Gemfile.lock
              /Rakefile
              /lib/gem2.rb
              /test/gem2_test.rb
              /gem2.gemspec

The following solano.yml will run the tests for each of the gems in parallel:

hooks:
  pre_setup: 'gem install bundler; for d in `ls -d gem*`; do mkdir -p $d/bundle && (cd $d && bundle config --local path ./bundle && bundle install); done'
tests:
  - 'cd gem1 && bundle config --local path ./bundle && bundle exec rake test'
  - 'cd gem2 && bundle config --local path ./bundle && bundle exec rake test'

Note

For a ruby project, if there’s no Gemfile at the repo root, Solano CI will not install bundler, so the script above does so.