Skip to content

Updated ci build scripts (from rspec-dev)main #2603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 114 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file was generated on 2022-06-01T13:16:05+02:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

name: RSpec CI
on:
push:
Expand All @@ -8,77 +11,138 @@ on:
pull_request:
branches:
- '*'
env:
RSPEC_CI: true
# This tells rspec-rails what branch to run in ci
RSPEC_VERSION: '= 3.12.0.pre'
jobs:
rubocop:
name: Rubocop
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- run: script/update_rubygems_and_install_bundler
- run: script/clone_all_rspec_repos
- 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
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
strategy:
fail-fast: false
matrix:
include:
# Edge Rails (7.1) builds >= 2.7
- ruby: 3.1
allow_failure: true
env:
RAILS_VERSION: 'main'
- ruby: '3.0'
allow_failure: true
env:
RAILS_VERSION: 'main'
- ruby: 2.7
allow_failure: true
env:
RAILS_VERSION: 'main'

# Rails 7.0 builds >= 2.7
- 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'

# Rails 6.1 builds >= 2.5
- ruby: 3.1
env:
RAILS_VERSION: '~> 6.1.0'
- ruby: '3.0'
env:
RAILS_VERSION: '~> 6.1.0'
- ruby: 2.7
env:
RAILS_VERSION: '~> 6.1.0'
- ruby: 2.6
env:
RAILS_VERSION: '~> 6.1.0'
- ruby: 2.5
env:
RAILS_VERSION: '~> 6.1.0'

ruby:
- '3.1'
- '3.0'
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- 2.1.9
env:
-
DIFF_LCS_VERSION: "> 1.4.3"
include:
- ruby: ruby-head
env:
RUBY_HEAD: true
- ruby: jruby-9.2.13.0
env:
JRUBY_OPTS: "--dev"
- ruby: jruby-9.1.17.0
bundler: 1
os: ubuntu-18.04
env:
JRUBY_OPTS: "--dev"
- ruby: 2.7
name_extra: "with diff-lcs 1.3"
env:
DIFF_LCS_VERSION: "~> 1.3.0"
- ruby: 2.7
name_extra: "with diff-lcs 1.4.3"
env:
DIFF_LCS_VERSION: "1.4.3"
fail-fast: false
continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
env: ${{ matrix.env }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler: ${{ matrix.bundler || '2.2.22' }}
ruby-version: ${{ matrix.ruby }}
- run: script/update_rubygems_and_install_bundler
- run: script/clone_all_rspec_repos
- run: bundle install --binstubs
- run: bundle install --standalone
- run: bundle binstubs --all
- run: script/run_build
continue-on-error: ${{ matrix.allow_failure || false }}

legacy:
name: Legacy Ruby Builds (${{ matrix.container.version }})
runs-on: ubuntu-20.04
container:
image: ${{ matrix.container.tag }}
options: ${{ matrix.container.options || '--add-host github-complains-if-this-is-empty.com:127.0.0.1' }}
strategy:
fail-fast: false
matrix:
container:
- version: "2.0"
tag: rspec/ci:2.0.0
- version: "1.9.3"
tag: rspec/ci:1.9.3
- version: "1.9.2"
tag: rspec/ci:1.9.2
options: "--add-host rubygems.org:151.101.129.227 --add-host api.rubygems.org:151.101.129.227"
- version: "1.8.7"
tag: rspec/ci:1.8.7
options: "--add-host rubygems.org:151.101.129.227 --add-host api.rubygems.org:151.101.129.227"
- version: "REE"
tag: rspec/ci:ree
options: "--add-host rubygems.org:151.101.129.227 --add-host api.rubygems.org:151.101.129.227"
- version: "JRuby 1.7"
tag: rspec/ci:jruby-1.7
- version: "JRuby 1.7 1.8 mode"
tag: rspec/ci:jruby-1.7
jruby_opts: '--dev --1.8'
pre: gem uninstall jruby-openssl
options: "--add-host rubygems.org:151.101.129.227 --add-host api.rubygems.org:151.101.129.227"
env:
LEGACY_CI: true
JRUBY_OPTS: ${{ matrix.container.jruby_opts || '--dev' }}
steps:
- uses: actions/checkout@v3
- run: ${{ matrix.container.pre }}
- run: script/legacy_setup.sh
- run: bundle exec bin/rspec
- run: bundle exec script/cucumber.sh

windows:
name: Ruby ${{ matrix.ruby }} (Windows)
runs-on: windows-latest
strategy:
matrix:
ruby:
- 2.7
- 2.6
- 2.5
- 2.4
- 2.3
- 2.2
- 2.1.9
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler: '2.2.22'
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: cinst ansicon
- run: bundle exec rspec --backtrace
Loading