This is a re-usable GitHub Actions workflow based on the post Building a Rails CI pipeline with GitHub Actions by Matt Swanson.
Blog Post: A GitHub Actions Rails CI Workflow in 5 lines
To use it, create a file in your repo at .github/workflows/verify.yml
containing:
name: Verify
on: [push]
jobs:
verify:
uses: andyw8/setup-rails/.github/workflows/verify.yml@v1
# uncomment to enable options:
#
# with:
# brakeman: true
# bundler-audit: true
# rspec: true
# rubocop: true
Alternatively, you can install with RailsBytes:
rails app:template LOCATION="https://railsbytes.com/script/VMys8A"
If you're using a non-x86 machine for development (e.g. Apple M1), you'll need to update Gemfile.lock
by running:
bundle lock --add-platform x86_64-linux
Here is an example app which uses this workflow.
- Assumes postgres, no support for mysql or other databases
- Assumes yarn, no support for npm