[ELITERT-1198] Add action to run Ruby linters #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow runs Rubocop and Reek on the Pull Requests to make sure | |
# no linter warnings slip by. | |
name: Ruby Linters | |
on: | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: ['2.7'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Run Rubocop | |
uses: reviewdog/action-rubocop@v2.19.1 | |
with: | |
skip_install: true | |
rubocop_version: gemfile | |
rubocop_extensions: rubocop-rspec:gemfile | |
use_bundler: true | |
- name: Run Reek | |
uses: reviewdog/action-reek@v1.16.0 | |
with: | |
reek_version: gemfile |