Use project version of Ruby in Github actions
Topics: Ruby, Continuous integration, Ruby testing
This GitHub Actions workflow reads the project’s .ruby-version file through ruby/setup-ruby, then enables Bundler caching before running RuboCop.
Subtopics
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: RuboCop
run: bin/rubocop -f github