Are you thinking about migrating a Ruby on Rails project CI pipeline to Github Actions? You will learn how to configure the Rails app to run RSpec tests using Github Actions.

This article covers a few things for Github Actions YAML config:

  • how to use ruby/setup-ruby action to install Ruby gems with bundler and automatically cache gems. This way you can load Ruby gems for your project from the cache and run CI build fast.
  • how to use Postgres on Github Actions
  • how to use Redis on Github Actions
  • how to use Github Actions build matrix to run parallel jobs and execute RSpec tests spread across multiple jobs to save time

Github Actions YML config for Rails application

ruby/setup-ruby action

ruby/setup-ruby is an action that you can use to install a particular Ruby programming language version. It allows you to cache Ruby gems based on your Gemfile.lock out of the box.

#tech #testing #github #github-actions

Github Actions Config for Ruby on Rails Tests in RSpec
1.55 GEEK