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
- Visit https://app.saturnci.com and sign up with GitHub
- Install the SaturnCI GitHub App when prompted
- 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: aDockerfileand adocker-compose.ymlwith 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.