Merge pull request #388 from koic/add_ci_for_the_oldest_supported_rub… #4
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: 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.30.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 |