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:
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.ruby/setup-ruby
Actionruby/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.
It’s recommended to use ruby/setup-ruby instead of outdated
actions/setup-ruby.
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
## Not needed with a .ruby-version file
ruby-version: 2.7
## runs 'bundle install' and caches installed gems automatically
bundler-cache: true
#ruby #testing #github #ruby on rails