Travis Core (or travis-core) contains shared code among different Travis CI applications.
See the README in lib/travis for more information on the structure of the repository.
Travis Core requires PostgreSQL 9.3 or higher, as well as a recent version of Redis and RabbitMQ.
- Clone the repository:
git clone https://github.com/travis-ci/travis-core.git
- Install gem dependencies:
cd travis-core; bundle install --binstubs --path=vendor/gems
NB detail for how rake
sets up the database can be found in the Rakefile
. In the namespace :db
block you will see the database name is configured using the environment variable RAILS_ENV. If you are using a different configuration you will have to make your own adjustments.
bundle exec rake db:create
- for testing, you will need to run
RAILS_ENV=test bundle exec rake db:create --trace
To run the RSpec tests, first make sure PostgreSQL, Redis and RabbitMQ are running, then do:
./build.sh
Individual specs can be run with bin/rspec
; e.g.,
bundle exec rspec spec/travis/model/job_spec.rb
Please fork the repository and submit a pull request. For larger changes, please open a ticket on our main issue tracker first.