Configuration

Here's how to get SaturnCI set up on your project.

Prerequisites

SaturnCI supports the two big Ruby testing frameworks, RSpec and Minitest. In order to use SaturnCI, your project must be hosted on GitHub.

Sign up and connect your repository

  1. Visit https://app.saturnci.com and sign up with GitHub
  2. Install the SaturnCI GitHub App when prompted
  3. Select your repository

Configure your application

Run the following command from your application's root directory:

rails app:template LOCATION=https://raw.githubusercontent.com/saturnci/saturnci-config-templates/main/rails/template.rb

This creates a .saturnci directory in your project containing everything SaturnCI needs:

  • workflows/default_workflow.rb — the workflow SaturnCI runs on every push. The one the template writes runs your test suite and finishes. Its create call names the environment the suite runs in, the service that runs it, and the command: bundle exec rspec.
  • environments/rspec/ — the environment the test suite runs in: a Dockerfile and a docker-compose.yml with Postgres and Chrome.

It also adds spec/support/saturnci_capybara.rb, which points your system specs at the Chrome service in that environment.

After running the template, commit the changes and push to GitHub:

git add .saturnci
git commit -m "Add SaturnCI configuration"
git push

Your tests will run automatically on each push.

Learn more