-
-
Notifications
You must be signed in to change notification settings - Fork 69
Drop CI support for Ruby < 2.3 #259
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ on: | |
pull_request: | ||
branches: | ||
- '*' | ||
env: | ||
RSPEC_CI: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forces |
||
jobs: | ||
test: | ||
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }} | ||
|
@@ -21,8 +23,6 @@ jobs: | |
- 2.5 | ||
- 2.4 | ||
- 2.3 | ||
- 2.2 | ||
- 2.1.9 | ||
- ruby-head | ||
env: | ||
- | ||
|
@@ -69,8 +69,6 @@ jobs: | |
- 2.5 | ||
- 2.4 | ||
- 2.3 | ||
- 2.2 | ||
- 2.1.9 | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,8 @@ if is_mri; then | |
clone_repo "rspec-core" | ||
clone_repo "rspec-expectations" | ||
clone_repo "rspec-mocks" | ||
clone_repo "rspec-rails" | ||
|
||
if rspec_support_compatible; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All builds are rspec-support compatible. |
||
clone_repo "rspec-support" | ||
fi | ||
clone_repo "rspec-rails" "main" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not all builds (Ruby 2.3, Ruby 2.4) builds are |
||
clone_repo "rspec-support" | ||
|
||
popd | ||
else | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,14 +9,20 @@ SPECS_HAVE_RUN_FILE=specs.out | |
MAINTENANCE_BRANCH=`cat maintenance-branch` | ||
|
||
# Don't allow rubygems to pollute what's loaded. Also, things boot faster | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we revert all these changes for now, it makes diffing harder and its easy to clean up post release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With an exception of Jokes aside, All of the changes to Except for the |
||
# without the extra load time of rubygems. Only works on MRI Ruby 1.9+ | ||
if is_mri_192_plus; then | ||
# without the extra load time of rubygems. Only works on MRI. | ||
if is_mri; then | ||
export RUBYOPT="--disable=gem" | ||
fi | ||
|
||
function clone_repo { | ||
if [ ! -d $1 ]; then # don't clone if the dir is already there | ||
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $MAINTENANCE_BRANCH" | ||
if [ -z "$2" ]; then | ||
BRANCH_TO_CLONE="$MAINTENANCE_BRANCH" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because |
||
else | ||
BRANCH_TO_CLONE="$2" | ||
fi | ||
|
||
travis_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch $BRANCH_TO_CLONE" | ||
fi; | ||
} | ||
|
||
|
@@ -44,12 +50,7 @@ function run_cukes { | |
|
||
echo "${PWD}/bin/cucumber" | ||
|
||
if is_mri_192; then | ||
# For some reason we get SystemStackError on 1.9.2 when using | ||
# the bin/cucumber approach below. That approach is faster | ||
# (as it avoids the bundler tax), so we use it on rubies where we can. | ||
bundle exec cucumber --strict | ||
elif is_jruby; then | ||
if is_jruby; then | ||
# For some reason JRuby doesn't like our improved bundler setup | ||
RUBYOPT="-I${PWD}/../bundle -rbundler/setup" \ | ||
PATH="${PWD}/bin:$PATH" \ | ||
|
@@ -79,8 +80,11 @@ function run_spec_suite_for { | |
echo "Running specs for $1" | ||
pushd ../$1 | ||
unset BUNDLE_GEMFILE | ||
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"` | ||
bundle_install_flags="--binstubs --standalone --without documentation --path ../bundle" | ||
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)" | ||
if [ $1 == rspec-rails ]; then | ||
unset RUBYOPT | ||
fi; | ||
run_specs_and_record_done | ||
popd | ||
else | ||
|
@@ -184,11 +188,8 @@ function run_all_spec_suites { | |
fold "rspec-core specs" run_spec_suite_for "rspec-core" | ||
fold "rspec-expectations specs" run_spec_suite_for "rspec-expectations" | ||
fold "rspec-mocks specs" run_spec_suite_for "rspec-mocks" | ||
fold "rspec-support specs" run_spec_suite_for "rspec-support" | ||
if rspec_rails_compatible; then | ||
fold "rspec-rails specs" run_spec_suite_for "rspec-rails" | ||
fi | ||
|
||
if rspec_support_compatible; then | ||
fold "rspec-support specs" run_spec_suite_for "rspec-support" | ||
fi | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,21 @@ | ||
function is_mri { | ||
if ruby -e "exit(!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby')"; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we revert all these changes for now, it makes diffing harder and its easy to clean up post release. |
||
# RUBY_ENGINE only returns 'ruby' on MRI. | ||
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode) | ||
# RUBY_ENGINE only returns 'ruby' on MRI. | ||
if ruby -e "exit(RUBY_ENGINE == 'ruby')"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi; | ||
} | ||
|
||
function is_jruby { | ||
if ruby -e "exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')"; then | ||
# RUBY_ENGINE only returns 'ruby' on MRI. | ||
# MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode) | ||
# RUBY_PLATFORM only returns 'java' on JRuby. | ||
if ruby -e "exit(RUBY_PLATFORM == 'java')"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi; | ||
} | ||
|
||
function is_mri_192 { | ||
if is_mri; then | ||
if ruby -e "exit(RUBY_VERSION == '1.9.2')"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function is_mri_192_plus { | ||
if is_mri; then | ||
if ruby -e "exit(RUBY_VERSION.to_f > 1.8)"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function is_mri_2plus { | ||
if is_mri; then | ||
if ruby -e "exit(RUBY_VERSION.to_f > 2.0)"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function is_ruby_23_plus { | ||
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function is_ruby_25_plus { | ||
if ruby -e "exit(RUBY_VERSION.to_f >= 2.5)"; then | ||
return 0 | ||
|
@@ -78,22 +32,14 @@ function rspec_rails_compatible { | |
fi | ||
} | ||
|
||
function rspec_support_compatible { | ||
if [ "$MAINTENANCE_BRANCH" != "2-99-maintenance" ] && [ "$MAINTENANCE_BRANCH" != "2-14-maintenance" ]; then | ||
return 0 | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function additional_specs_available { | ||
type run_additional_specs > /dev/null 2>&1 | ||
return $? | ||
} | ||
|
||
function documentation_enforced { | ||
if [ -x ./bin/yard ]; then | ||
if is_mri_2plus; then | ||
if is_mri; then | ||
return 0 | ||
else | ||
return 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,5 @@ | |
set -e | ||
source script/functions.sh | ||
|
||
if is_ruby_23_plus; then | ||
yes | gem update --system | ||
yes | gem install bundler | ||
else | ||
echo "Warning installing older versions of Rubygems / Bundler" | ||
gem update --system '2.7.8' | ||
gem install bundler -v '1.17.3' | ||
fi | ||
yes | gem update --system | ||
yes | gem install bundler | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we revert all these changes for now, it makes diffing harder and its easy to clean up post release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not send CI file updates to
rspec-rails
.