Merge pull request #24 from strnglp/arbProgress-fix #76
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
name: Rubocop | |
on: | |
push: | |
paths: | |
- "**/*.rb" | |
- "profanity.rb" | |
pull_request: | |
paths: | |
- "**/*.rb" | |
- "profanity.rb" | |
jobs: | |
rubocop: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: ['3.3'] | |
name: Run Rubocop on Ruby ${{ matrix.ruby }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
**/*.rb | |
profanity.rb | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
- name: Install ruby gem dependencies with bundler | |
run: | | |
gem install bundler | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- run: bundle install | |
- name: Rubocop | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
bundle exec rubocop $file | |
done |