Skip to content

Gemfile: workarounds for avoiding version mismatch on GitHub Actions #8

Gemfile: workarounds for avoiding version mismatch on GitHub Actions

Gemfile: workarounds for avoiding version mismatch on GitHub Actions #8

Workflow file for this run

# .github/workflows/rubocop.yml
name: RuboCop
on:
push:
branches:
- '**' # run on every branch
pull_request:
branches:
- '**' # run on every PR branch
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2' # adjust to match your project
bundler-cache: true
- name: Workaround for pathname gem version mismatch
run: bundle update --bundler && bundle update --all
- name: Run RuboCop
run: bundle exec rubocop