Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI In Sub Directory

Tags:

travis-ci

I have a gem with a subdirectory (test) containing a Rails 3.1.1 application used to test the project. I'm trying to setup Travis-CI for continuous integration, however I cannot figure out how to setup my .travis.yml configuration. I have:

gemfile: test/Gemfile
rvm:
  - 1.8.7
  - 1.9.2
  - 1.9.3
  - jruby
  - ree
script: sh -e 'cd test' && bundle exec rake db:drop db:create db:migrate test

Which causes:

sh: Can't open cd test

Any ideas?

like image 804
Kevin Sylvestre Avatar asked Oct 21 '11 06:10

Kevin Sylvestre


People also ask

Is Travis CI a CI tool?

Like Jenkins, Travis CI is also one of the early players in the CI/CD tools market. The tool is written in Ruby and is developed & maintained by the Travis CI community. Travis CI was earlier available only for GitHub hosted projects but now it also supports Bitbucket hosted projects.

Which of the following file is used to configure the Travis CI?

Configuration. Travis CI is configured by adding a file named . travis. yml , which is a YAML format text file, to the root directory of the repository.

Which of the following type of commands are supported by Travis CLI?

There are three types of commands: Non-API Commands, General API Commands and Repository Commands. All commands take the form of travis COMMAND [ARGUMENTS] [OPTIONS] .


1 Answers

Found it was an issue with some of the documentation. The script call should have been:

script: sh -c 'cd test && bundle exec rake db:drop db:create db:migrate test'
like image 127
Kevin Sylvestre Avatar answered Nov 09 '22 03:11

Kevin Sylvestre