Merge pull request #2824 from rspec/fix-build #1270
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: RSpec CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- '*-maintenance' | |
- '*-dev' | |
- 'pr-*' | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
rubocop: | |
name: Rubocop | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3' | |
- run: script/update_rubygems_and_install_bundler | |
- run: bundle install --standalone | |
- run: bundle binstubs --all | |
- run: script/run_rubocop | |
test: | |
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.env.RAILS_VERSION }}' | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
# Edge Rails (?) builds >= 3.1 | |
- ruby: 3.3 | |
env: | |
RAILS_VERSION: 'main' | |
- ruby: 3.2 | |
env: | |
RAILS_VERSION: 'main' | |
# Rails 8.0 builds >= 3.2 | |
- ruby: 3.3 | |
env: | |
RAILS_VERSION: '~> 8.0.0' | |
- ruby: 3.2 | |
env: | |
RAILS_VERSION: '~> 8.0.0' | |
# Rails 7.2 builds >= 3.1 | |
- ruby: 3.3 | |
env: | |
RAILS_VERSION: '~> 7.2.0' | |
- ruby: 3.2 | |
env: | |
RAILS_VERSION: '~> 7.2.0' | |
- ruby: 3.1 | |
env: | |
RAILS_VERSION: '~> 7.2.0' | |
# Rails 7.1 builds >= 2.7 | |
- ruby: 3.3 | |
env: | |
RAILS_VERSION: '~> 7.1.0' | |
- ruby: 3.2 | |
env: | |
RAILS_VERSION: '~> 7.1.0' | |
- ruby: 3.1 | |
env: | |
RAILS_VERSION: '~> 7.1.0' | |
- ruby: '3.0' | |
env: | |
RAILS_VERSION: '~> 7.1.0' | |
- ruby: 2.7 | |
env: | |
RAILS_VERSION: '~> 7.1.0' | |
# Rails 7.0 builds >= 2.7 | |
- ruby: 3.2 | |
env: | |
RAILS_VERSION: '~> 7.0.0' | |
- ruby: 3.1 | |
env: | |
RAILS_VERSION: '~> 7.0.0' | |
- ruby: '3.0' | |
env: | |
RAILS_VERSION: '~> 7.0.0' | |
- ruby: 2.7 | |
env: | |
RAILS_VERSION: '~> 7.0.0' | |
env: ${{ matrix.env }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- run: script/update_rubygems_and_install_bundler | |
- run: script/clone_all_rspec_repos | |
- run: bundle install --binstubs | |
- run: script/run_build | |
continue-on-error: ${{ matrix.allow_failure || false }} |