Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 4 months ago
JSON representation

A re-usable GitHub Actions CI workflow for verifying Rails apps

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