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

Commit ba63434

Browse files
committed
Merge pull request #2783 from rspec/update-ci-build-scripts-2020-11-18-for-main
Updates from rspec-dev (2020-11-18)
1 parent 3313fc0 commit ba63434

15 files changed

+50
-64
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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
@@ -40,3 +40,27 @@ jobs:
4040
- run: script/clone_all_rspec_repos
4141
- run: bundle install --binstubs --standalone
4242
- run: script/run_build
43+
44+
windows:
45+
name: Ruby ${{ matrix.ruby }} (Windows)
46+
runs-on: windows-latest
47+
strategy:
48+
matrix:
49+
ruby:
50+
- 2.7
51+
- 2.6
52+
- 2.5
53+
- 2.4
54+
- 2.3
55+
- 2.2
56+
- 2.1.9
57+
fail-fast: false
58+
steps:
59+
- uses: actions/checkout@v2
60+
- uses: ruby/setup-ruby@v1
61+
with:
62+
bundler: 2
63+
ruby-version: ${{ matrix.ruby }}
64+
bundler-cache: true
65+
- run: cinst ansicon
66+
- run: bundle exec rspec --backtrace

.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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file was generated on 2020-11-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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.

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|min
4444
gem 'ffi', '< 1.10'
4545
elsif RUBY_VERSION < '2.0'
4646
gem 'ffi', '< 1.9.19' # ffi dropped Ruby 1.8 support in 1.9.19
47+
elsif RUBY_VERSION < '2.3.0'
48+
gem 'ffi', '~> 1.12.0'
4749
else
48-
gem 'ffi', '~> 1.11.0'
50+
gem 'ffi', '~> 1.13.0'
4951
end
5052

5153
if RUBY_VERSION < '2.3.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/)

appveyor.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-18T09:45:41+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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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-16T22:10:29+00:00 from the rspec-dev repo.
1+
# This file was generated on 2020-11-18T09:45:41+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-18T09:45:41+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-16T22:10:29+00:00 from the rspec-dev repo.
2+
# This file was generated on 2020-11-18T09:45:41+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/bisect_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ module RSpec::Core
44
RSpec.describe "Bisect", :slow, :simulate_shell_allowing_unquoted_ids do
55
include FormatterSupport
66

7-
before do
8-
skip "These specs do not consistently pass or fail on AppVeyor on Ruby 2.1+"
9-
end if ENV['APPVEYOR'] && RUBY_VERSION.to_f > 2.0
10-
117
def bisect(cli_args, expected_status=nil)
128
options = ConfigurationOptions.new(cli_args)
139

spec/rspec/core/configuration_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,7 @@ def stub_expectation_adapters
535535
expect(config.files_to_run).to contain_files("./spec/rspec/core/resources/a_spec.rb")
536536
end
537537

538-
it "supports absolute path patterns", :failing_on_appveyor,
539-
:pending => false,
540-
:skip => (ENV['APPVEYOR'] ? "Failing on AppVeyor but :pending isn't working for some reason" : false) do
538+
it "supports absolute path patterns", :emits_warning_on_windows_on_old_ruby do
541539
dir = File.expand_path("../resources", __FILE__)
542540
config.pattern = File.join(dir, "**/*_spec.rb")
543541
assign_files_or_directories_to_run "spec"
@@ -618,7 +616,7 @@ def stub_expectation_adapters
618616
expect(config.files_to_run).to contain_files("C:/path/to/project/spec/sub/foo_spec.rb")
619617
end
620618

621-
it "loads files in Windows when directory is specified", :failing_on_appveyor, :if => RSpec::Support::OS.windows? do
619+
it "loads files in Windows when directory is specified", :failing_on_windows_ci, :if => RSpec::Support::OS.windows? do
622620
assign_files_or_directories_to_run "spec\\rspec\\core\\resources"
623621
expect(config.files_to_run).to contain_files("spec/rspec/core/resources/a_spec.rb")
624622
end

spec/rspec/core/rake_task_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,7 @@ def self.it_configures_rspec_load_path(description, path_template)
308308
end
309309

310310
context "that is an absolute path file glob" do
311-
it "loads the matching spec files", :failing_on_appveyor,
312-
:pending => false,
313-
:skip => (ENV['APPVEYOR'] ? "Failing on AppVeyor but :pending isn't working for some reason" : false) do
311+
it "loads the matching spec files", :emits_warning_on_windows_on_old_ruby, :pending_on_windows_old_ruby do
314312
dir = File.expand_path("../resources", __FILE__)
315313
task.pattern = File.join(dir, "**/*_spec.rb")
316314

@@ -443,7 +441,7 @@ def make_files_in_dir(dir)
443441
context "with paths with quotes or spaces" do
444442
include_context "isolated directory"
445443

446-
it "matches files with quotes and spaces", :failing_on_appveyor do
444+
it "matches files with quotes and spaces", :failing_on_windows_ci do
447445
spec_dir = File.join(Dir.getwd, "spec")
448446
task.pattern = "spec/*spec.rb"
449447
FileUtils.mkdir_p(spec_dir)

spec/spec_helper.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,16 @@ def handle_current_dir_change
9797
with_env_vars('SHELL' => '/usr/local/bin/bash', &ex)
9898
end
9999

100+
if ENV['CI'] && RSpec::Support::OS.windows? && RUBY_VERSION.to_f < 2.3
101+
c.around(:example, :emits_warning_on_windows_on_old_ruby) do |ex|
102+
ignoring_warnings(&ex)
103+
end
104+
105+
c.define_derived_metadata(:pending_on_windows_old_ruby => true) do |metadata|
106+
metadata[:pending] = "This example is expected to fail on windows, on ruby older than 2.3"
107+
end
108+
end
109+
100110
c.filter_run_excluding :ruby => lambda {|version|
101111
case version.to_s
102112
when "!jruby"

0 commit comments

Comments
 (0)