Skip to content

Commit

Permalink
Add CI for the oldest supported RuboCop version
Browse files Browse the repository at this point in the history
This PR introduces CI for the oldest RuboCop version still supported,
implementing a workflow for regression testing that is similar to the one found a
rubocop/rubocop-rails@c9acb7a.
  • Loading branch information
koic committed Nov 23, 2023
1 parent 8232082 commit ac418a3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
oldest_supported_rubocop:
runs-on: ubuntu-latest
name: The oldest supported RuboCop version
steps:
- uses: actions/checkout@v4
- name: Use the oldest supported RuboCop
run: |
sed -e "/gem 'rubocop', github: 'rubocop\/rubocop'/d" \
-e "/gem 'rubocop-rspec',/d" -i Gemfile
cat << EOF > Gemfile.local
gem 'rubocop', '1.7.0' # Specify the oldest supported RuboCop version
EOF
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: spec
run: bundle exec rake spec

0 comments on commit ac418a3

Please sign in to comment.