Merge pull request #130 from rubocop/fix-rubocop-offenses #283
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: | |
pull_request: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
confirm_config_and_documentation: | |
runs-on: ubuntu-latest | |
name: Confirm config and documentation | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- run: bundle exec rake confirm_config documentation_syntax_check confirm_documentation | |
main: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby: | |
- "2.7" | |
- "3.0" | |
- "3.1" | |
- "3.2" | |
- "3.3" | |
- ruby-head | |
- jruby-9.4 | |
task: | |
- internal_investigation | |
- spec | |
name: "Ruby ${{ matrix.ruby }}: ${{ matrix.task }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "${{ matrix.ruby }}" | |
bundler-cache: true | |
- run: NO_COVERAGE=true bundle exec rake ${{ matrix.task }} | |
coverage: | |
runs-on: ubuntu-latest | |
name: "Test coverage" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- run: bundle exec rake spec | |
edge-rubocop: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
task: | |
- internal_investigation | |
- spec | |
name: "Edge RuboCop: ${{ matrix.task }}" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use latest RuboCop from `master` | |
run: | | |
echo "gem 'rubocop', github: 'rubocop/rubocop'" > Gemfile.local | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true | |
- run: NO_COVERAGE=true bundle exec rake ${{ matrix.task }} | |
prism: | |
runs-on: ubuntu-latest | |
name: Prism | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use prism parser | |
run: | | |
cat << EOF > Gemfile.local | |
gem 'prism' | |
EOF | |
- name: set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
# Specify the minimum Ruby version 2.7 required for Prism to run. | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: spec | |
env: | |
PARSER_ENGINE: parser_prism | |
run: NO_COVERAGE=true bundle exec rake |