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

Commit cb0f0c8

Browse files
authored
Merge pull request #2785 from rspec/update-ci-build-scripts-2020-11-22-for-main
Updates from rspec-dev (2020-11-22)
2 parents bbe3566 + e4b605d commit cb0f0c8

File tree

12 files changed

+61
-30
lines changed

12 files changed

+61
-30
lines changed

.github/workflows/ci.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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
@@ -13,8 +13,8 @@ on:
1313
- '*'
1414
jobs:
1515
test:
16-
name: Ruby ${{ matrix.ruby }}
17-
runs-on: ubuntu-20.04
16+
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
17+
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
1818
strategy:
1919
matrix:
2020
ruby:
@@ -27,15 +27,35 @@ jobs:
2727
- 2.2
2828
- 2.1.9
2929
- ruby-head
30+
env:
31+
-
32+
DIFF_LCS_VERSION: "> 1.4.3"
33+
include:
34+
- ruby: jruby-9.2.13.0
35+
env:
36+
JRUBY_OPTS: "--dev"
37+
- ruby: jruby-9.1.17.0
38+
bundler: 1
39+
os: ubuntu-18.04
40+
env:
41+
JRUBY_OPTS: "--dev"
42+
- ruby: 2.7
43+
name_extra: "with diff-lcs 1.3"
44+
env:
45+
DIFF_LCS_VERSION: "~> 1.3.0"
46+
- ruby: 2.7
47+
name_extra: "with diff-lcs 1.4.3"
48+
env:
49+
DIFF_LCS_VERSION: "1.4.3"
3050
fail-fast: false
31-
continue-on-error: ${{ matrix.ruby == 'jruby-9.2.13.0' || endsWith(matrix.ruby, 'head') }}
51+
continue-on-error: ${{ matrix.allow_failure || endsWith(matrix.ruby, 'head') }}
52+
env: ${{ matrix.env }}
3253
steps:
3354
- uses: actions/checkout@v2
3455
- uses: ruby/setup-ruby@v1
3556
with:
36-
bundler: ${{ (matrix.ruby == 'jruby-9.1.17.0' && 1) || 2 }}
57+
bundler: ${{ matrix.bundler || 2 }}
3758
ruby-version: ${{ matrix.ruby }}
38-
bundler-cache: true
3959
- run: script/update_rubygems_and_install_bundler
4060
- run: script/clone_all_rspec_repos
4161
- run: bundle install --binstubs --standalone

.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-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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

.travis.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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
# In order to install old Rubies, we need to use old Ubuntu distibution.
@@ -20,24 +20,13 @@ rvm:
2020
- 1.9.3
2121
- 2.0.0
2222
- ree
23-
- rbx-3
24-
- jruby-9.1.7.0 # pin JRuby to this until travis/rvm can install later versions
25-
- jruby-head
2623
- jruby-1.7
2724
env:
2825
- JRUBY_OPTS='--dev'
2926
matrix:
3027
include:
3128
- rvm: jruby-1.7
3229
env: JRUBY_OPTS='--dev --1.8'
33-
- rvm: 2.7.1
34-
env: DIFF_LCS_VERSION="~> 1.3.0"
35-
- rvm: 2.7.1
36-
env: DIFF_LCS_VERSION="1.4.3"
37-
allow_failures:
38-
- rvm: jruby-head
39-
- rvm: ruby-head
40-
- rvm: rbx-3
4130
fast_finish: true
4231
branches:
4332
only:

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ elsif RUBY_VERSION < '2.0'
4646
gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19
4747
elsif RUBY_VERSION < '2.3.0'
4848
gem 'ffi', '~> 1.12.0'
49+
elsif defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java'
50+
# Until 1.13.2 is released
51+
gem 'ffi', '~> 1.12.0'
4952
else
5053
gem 'ffi', '~> 1.13.0'
5154
end

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-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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-11-18T09:45:41+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-22T07:41:13+00: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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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 )"

script/predicate_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-11-18T09:45:41+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-22T07:41:13+00: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 {

script/run_build

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-11-18T09:45:41+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-22T07:41:13+00: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/update_rubygems_and_install_bundler

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-11-18T09:45:41+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-22T07:41:13+00: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

spec/integration/suite_hooks_errors_spec.rb

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
let(:failure_exit_code) { rand(97) + 2 } # 2..99
99
let(:error_exit_code) { failure_exit_code + 2 } # 4..101
1010

11-
if RSpec::Support::Ruby.jruby_9000?
11+
if RSpec::Support::Ruby.jruby_9000? && RSpec::Support::Ruby.jruby_version > '9.2.0.0'
12+
let(:spec_line_suffix) { ":in `block in <main>'" }
13+
elsif RSpec::Support::Ruby.jruby_9000?
1214
let(:spec_line_suffix) { ":in `block in (root)'" }
1315
elsif RSpec::Support::Ruby.jruby?
1416
let(:spec_line_suffix) { ":in `(root)'" }
@@ -97,6 +99,19 @@ def run_spec_expecting_non_zero(before_or_after)
9799
end
98100
"
99101

102+
cause =
103+
if RSpec::Support::Ruby.jruby_9000? && RSpec::Support::Ruby.jruby_version > '9.2.0.0'
104+
unindent(<<-EOS)
105+
# ------------------
106+
# --- Caused by: ---
107+
# RuntimeError:
108+
# before 1
109+
# ./the_spec.rb:3:in `block in <main>'
110+
EOS
111+
else
112+
""
113+
end
114+
100115
run_command "the_spec.rb"
101116
expect(last_cmd_exit_status).to eq(error_exit_code)
102117
output = normalize_durations(last_cmd_stdout)
@@ -116,14 +131,14 @@ def run_spec_expecting_non_zero(before_or_after)
116131
RuntimeError:
117132
after 2
118133
# ./the_spec.rb:6#{spec_line_suffix}
119-
134+
#{ cause }
120135
An error occurred in an `after(:suite)` hook.
121136
Failure/Error: c.after(:suite) { raise 'after 1' }
122137
123138
RuntimeError:
124139
after 1
125140
# ./the_spec.rb:5#{spec_line_suffix}
126-
141+
#{ cause }
127142
128143
Finished in n.nnnn seconds (files took n.nnnn seconds to load)
129144
0 examples, 0 failures, 3 errors occurred outside of examples

spec/rspec/core/formatters/exception_presenter_spec.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,9 @@ def read_failed_lines
509509

510510
context 'and the line count does not exceed RSpec.configuration.max_displayed_failure_line_count' do
511511
it 'returns all the lines' do
512-
pending 'https://github.com/jruby/jruby/issues/4737' if RSpec::Support::Ruby.jruby_9000?
512+
if RSpec::Support::Ruby.jruby_9000? && RSpec::Support::Ruby.jruby_version < '9.2.0.0'
513+
pending 'https://github.com/jruby/jruby/issues/4737'
514+
end
513515
expect(read_failed_lines).to eq([
514516
" expect('RSpec').to be_a(String).",
515517
" and start_with('R').",
@@ -524,7 +526,9 @@ def read_failed_lines
524526
end
525527

526528
it 'returns the lines without exceeding the max count' do
527-
pending 'https://github.com/jruby/jruby/issues/4737' if RSpec::Support::Ruby.jruby_9000?
529+
if RSpec::Support::Ruby.jruby_9000? && RSpec::Support::Ruby.jruby_version < '9.2.0.0'
530+
pending 'https://github.com/jruby/jruby/issues/4737'
531+
end
528532
expect(read_failed_lines).to eq([
529533
" expect('RSpec').to be_a(String).",
530534
" and start_with('R')."

0 commit comments

Comments
 (0)