Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit e29a755

Browse files
authored
Merge pull request #2902 from rspec/update-ci-build-scripts-2021-07-13-for-4-0-dev
Updates from rspec-dev (2021-07-13)
2 parents 780580b + cd0a427 commit e29a755

13 files changed

+33
-27
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
1+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
name: RSpec CI
@@ -50,11 +50,12 @@ jobs:
5050
- uses: actions/checkout@v2
5151
- uses: ruby/setup-ruby@v1
5252
with:
53-
bundler: ${{ matrix.bundler || 2 }}
53+
bundler: ${{ matrix.bundler || '2.2.22' }}
5454
ruby-version: ${{ matrix.ruby }}
5555
- run: script/update_rubygems_and_install_bundler
5656
- run: script/clone_all_rspec_repos
57-
- run: bundle install --binstubs --standalone
57+
- run: bundle install --standalone
58+
- run: bundle binstubs --all
5859
- run: script/run_build
5960

6061
windows:
@@ -73,7 +74,7 @@ jobs:
7374
- uses: actions/checkout@v2
7475
- uses: ruby/setup-ruby@v1
7576
with:
76-
bundler: 2
77+
bundler: '2.2.22'
7778
ruby-version: ${{ matrix.ruby }}
7879
bundler-cache: true
7980
- run: cinst ansicon

.rubocop_rspec_base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
1+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# This file contains defaults for RSpec projects. Individual projects

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ group :documentation do
2020
gem 'github-markup', :platform => :mri
2121
end
2222

23-
# Until 1.13.2 is released due to Rubygems usage
24-
gem 'ffi', '~> 1.12.0'
23+
gem 'ffi', '~> 1.15.0'
2524

2625
gem "jruby-openssl", platforms: :jruby
2726

script/ci_functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
1+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
# Taken from:

script/clone_all_rspec_repos

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
2+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e

script/functions.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
1+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -139,10 +139,7 @@ function check_binstubs {
139139
echo " $ bundle binstubs$gems"
140140
echo
141141
echo " # To binstub all gems"
142-
echo " $ bundle install --binstubs"
143-
echo
144-
echo " # To binstub all gems and avoid loading bundler"
145-
echo " $ bundle install --binstubs --standalone"
142+
echo " $ bundle binstubs --all"
146143
fi
147144

148145
return $success

script/predicate_functions.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
1+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
22
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33

44
function is_mri {
@@ -129,9 +129,13 @@ function documentation_enforced {
129129
}
130130

131131
function style_and_lint_enforced {
132-
if [ -x ./bin/rubocop ]; then
133-
return 0
134-
else
132+
if is_ruby_head; then
135133
return 1
134+
else
135+
if [ -x ./bin/rubocop ]; then
136+
return 0
137+
else
138+
return 1
139+
fi
136140
fi
137141
}

script/run_build

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
2+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
@@ -30,6 +30,7 @@ fi
3030

3131
if supports_cross_build_checks; then
3232
fold "one-by-one specs" run_specs_one_by_one
33+
export NO_COVERAGE=true
3334
run_all_spec_suites
3435
else
3536
echo "Skipping the rest of the build on non-MRI rubies"

script/update_rubygems_and_install_bundler

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
2-
# This file was generated on 2020-12-31T00:51:08+03:00 from the rspec-dev repo.
2+
# This file was generated on 2021-07-13T11:08:51+01:00 from the rspec-dev repo.
33
# DO NOT modify it by hand as your changes will get lost the next time it is generated.
44

55
set -e
66
source script/functions.sh
77

88
if is_ruby_23_plus; then
9-
yes | gem update --system
10-
yes | gem install bundler
9+
yes | gem update --system '3.2.22'
10+
yes | gem install bundler -v '2.2.22'
1111
else
1212
echo "Warning installing older versions of Rubygems / Bundler"
1313
gem update --system '2.7.8'

spec/integration/spec_file_load_errors_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
RSpec.configure do |c|
2121
c.filter_gems_from_backtrace "gems/aruba"
22+
c.filter_gems_from_backtrace "gems/bundler"
2223
c.backtrace_exclusion_patterns << %r{/rspec-core/spec/} << %r{rspec_with_simplecov}
2324
c.failure_exit_code = failure_exit_code
2425
c.error_exit_code = error_exit_code

spec/integration/suite_hooks_errors_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
RSpec.configure do |c|
2323
c.filter_gems_from_backtrace "gems/aruba"
24+
c.filter_gems_from_backtrace "gems/bundler"
2425
c.backtrace_exclusion_patterns << %r{/rspec-core/spec/} << %r{rspec_with_simplecov}
2526
c.failure_exit_code = failure_exit_code
2627
c.error_exit_code = error_exit_code

spec/rspec/core/formatters/base_text_formatter_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,15 +200,15 @@ def run_all_and_dump_failures
200200
it "does not show the error class" do
201201
group.example("example name") { expect("this").to eq("that") }
202202
run_all_and_dump_failures
203-
expect(formatter_output.string).not_to match(/RSpec/m)
203+
expect(formatter_output.string).not_to match(/RSpec::/m)
204204
end
205205
end
206206

207207
context "with a failed message expectation (rspec-mocks)" do
208208
it "does not show the error class" do
209209
group.example("example name") { expect("this").to receive("that") }
210210
run_all_and_dump_failures
211-
expect(formatter_output.string).not_to match(/RSpec/m)
211+
expect(formatter_output.string).not_to match(/RSpec::/m)
212212
end
213213
end
214214

spec/support/formatter_support.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def run_rspec_with_formatter(formatter, options={})
3333

3434
runner = RSpec::Core::Runner.new(options)
3535
configuration = runner.configuration
36+
configuration.filter_gems_from_backtrace "gems/bundler"
3637
configuration.backtrace_formatter.exclusion_patterns << /rspec_with_simplecov/
3738
configuration.backtrace_formatter.inclusion_patterns = []
3839

@@ -41,6 +42,7 @@ def run_rspec_with_formatter(formatter, options={})
4142
runner.run(err, out)
4243
out.string
4344
end
45+
RUN_LINE = __LINE__ - 3
4446

4547
def normalize_durations(output)
4648
output.gsub(/(?:\d+ minutes? )?\d+(?:\.\d+)?(s| seconds?)/) do |dur|
@@ -66,7 +68,7 @@ def expected_summary_output_for_example_specs
6668
|
6769
| (compared using ==)
6870
| # ./spec/rspec/core/resources/formatter_specs.rb:18:in `block (3 levels) in <top (required)>'
69-
| # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter'
71+
| # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter'
7072
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
7173
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
7274
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -86,7 +88,7 @@ def expected_summary_output_for_example_specs
8688
|
8789
| (compared using ==)
8890
| # ./spec/rspec/core/resources/formatter_specs.rb:37:in `block (2 levels) in <top (required)>'
89-
| # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter'
91+
| # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter'
9092
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
9193
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
9294
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'
@@ -117,7 +119,7 @@ def expected_summary_output_for_example_specs
117119
| foo
118120
| # (erb):1:in `<main>'
119121
| # ./spec/rspec/core/resources/formatter_specs.rb:50:in `block (2 levels) in <top (required)>'
120-
| # ./spec/support/formatter_support.rb:41:in `run_rspec_with_formatter'
122+
| # ./spec/support/formatter_support.rb:#{RUN_LINE}:in `run_rspec_with_formatter'
121123
| # ./spec/support/formatter_support.rb:3:in `run_example_specs_with_formatter'
122124
| # ./spec/support/sandboxing.rb:16:in `block (3 levels) in <top (required)>'
123125
| # ./spec/support/sandboxing.rb:7:in `block (2 levels) in <top (required)>'

0 commit comments

Comments
 (0)