https://github.com/setup-rails/setup-rails
A re-usable GitHub Actions CI workflow for verifying Rails apps
https://github.com/setup-rails/setup-rails
ci linting rails rspec rubocop
Last synced: 2 months ago
JSON representation
A re-usable GitHub Actions CI workflow for verifying Rails apps
- Host: GitHub
- URL: https://github.com/setup-rails/setup-rails
- Owner: setup-rails
- License: mit
- Created: 2022-03-25T13:38:29.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-12T12:32:00.000Z (2 months ago)
- Last Synced: 2025-04-12T13:48:17.301Z (2 months ago)
- Topics: ci, linting, rails, rspec, rubocop
- Homepage: https://github.com/andyw8/setup-rails
- Size: 93.8 KB
- Stars: 32
- Watchers: 2
- Forks: 3
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# setup-rails
This is a re-usable GitHub Actions workflow based on the post [Building a Rails CI pipeline with GitHub Actions](https://boringrails.com/articles/building-a-rails-ci-pipeline-with-github-actions/) by [Matt Swanson](https://github.com/swanson).
Blog Post: [A GitHub Actions Rails CI Workflow in 5 lines](https://www.andywaite.com/2022/04/15/reusable-github-actions-rails-workflow.html)
To use it, create a file in your repo at `.github/workflows/verify.yml`
containing:```yaml
name: Verify
on: [push, pull_request]jobs:
verify:
uses: setup-rails/setup-rails/.github/workflows/verify.yml@v1 # use @main for latest updates
# uncomment to enable options:
#
# with:
# brakeman: true
# bundler-audit: true
# rspec: true
# rubocop: true
# standard: true
```Alternatively, you can install with [RailsBytes](https://railsbytes.com/templates/VMys8A):
```
rails app:template LOCATION="https://railsbytes.com/script/VMys8A"
```You may also need to update `Gemfile.lock` by running:
```
bundle lock --add-platform x86_64-linux
```[Here is an example app](https://github.com/andyw8/setup-rails-example-app) which uses this workflow.
## Current Limitations
- Assumes postgres, no support for mysql or other databases
- Assumes yarn or [bun](https://bun.sh), no support for npm