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

Commit 78e02cd

Browse files
authored
Merge pull request #439 from rspec/update-ci-build-scripts-2020-11-18-for-main
Updates from rspec-dev (2020-11-18)
2 parents 733fca7 + e5b3bf5 commit 78e02cd

15 files changed

+44
-62
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:30+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:30+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:30+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
@@ -49,8 +49,10 @@ if RUBY_VERSION < '2.2.0' && !!(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|min
4949
elsif RUBY_VERSION < '2.0'
5050
# ffi dropped Ruby 1.8 support in 1.9.19 and Ruby 1.9 support in 1.11.0
5151
gem 'ffi', '< 1.9.19'
52+
elsif RUBY_VERSION < '2.3.0'
53+
gem 'ffi', '~> 1.12.0'
5254
else
53-
gem 'ffi', '~> 1.11.0'
55+
gem 'ffi', '~> 1.13.0'
5456
end
5557

5658
# No need to run rubocop on earlier versions

appveyor.yml

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

lib/rspec/support/spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636

3737
c.example_status_persistence_file_path = "./spec/examples.txt"
3838

39-
c.define_derived_metadata :failing_on_appveyor do |meta|
40-
meta[:pending] ||= "This spec fails on AppVeyor and needs someone to fix it."
41-
end if ENV['APPVEYOR']
39+
c.define_derived_metadata :failing_on_windows_ci do |meta|
40+
meta[:pending] ||= "This spec fails on Windows CI and needs someone to fix it."
41+
end if RSpec::Support::OS.windows? && ENV['CI']
4242
end
4343

4444
module RSpec

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:30+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:30+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:30+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:30+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:30+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:30+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/rspec/support/differ_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def differ_ivars
155155
expect(diff).to be_diffed_as(expected_diff)
156156
end
157157

158-
it 'uses the default external encoding when the two strings have incompatible encodings', :failing_on_appveyor do
158+
it 'uses the default external encoding when the two strings have incompatible encodings' do
159159
expected = "Tu avec carte {count} item has\n"
160160
actual = "Tu avec carté {count} itém has\n".encode('UTF-16LE')
161161
expected_diff = "\n@@ #{one_line_header} @@\n-Tu avec carte {count} item has\n+Tu avec carté {count} itém has\n"
@@ -312,7 +312,7 @@ def inspect; "<BrokenObject>"; end
312312
end
313313
end
314314

315-
it 'outputs unified diff message of two hashes with differing encoding', :failing_on_appveyor do
315+
it 'outputs unified diff message of two hashes with differing encoding' do
316316
expected_diff = dedent(<<-"EOD")
317317
|
318318
|@@ #{one_line_header} @@
@@ -325,7 +325,7 @@ def inspect; "<BrokenObject>"; end
325325
expect(diff).to be_diffed_as(expected_diff)
326326
end
327327

328-
it 'outputs unified diff message of two hashes with encoding different to key encoding', :failing_on_appveyor do
328+
it 'outputs unified diff message of two hashes with encoding different to key encoding' do
329329
expected_diff = dedent(<<-"EOD")
330330
|
331331
|@@ #{one_line_header} @@

spec/rspec/support/directory_maker_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def directory_exists?(dirname)
2828
context "when a file already exists" do
2929
before { File.open("tmp", "w") }
3030

31-
it "raises, as it can't make the directory", :failing_on_appveyor,
32-
:pending => false,
33-
:skip => (ENV['APPVEYOR'] ? "Failing on AppVeyor but :pending isn't working for some reason" : false) do
31+
it "raises, as it can't make the directory", :failing_on_windows_ci do
3432
expect {
3533
mkdir_p.call(dirname)
3634
}.to raise_error(Errno::EEXIST)

spec/rspec/support/spec/stderr_splitter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
stderr_methods -= [:birthtime] if RUBY_VERSION =~ /^2\.2/
3333

3434
# No idea why, but on our AppVeyor windows builds it doesn't respond to these...
35-
stderr_methods -= [:close_on_exec?, :close_on_exec=] if RSpec::Support::OS.windows?
35+
stderr_methods -= [:close_on_exec?, :close_on_exec=] if RSpec::Support::OS.windows? && ENV['CI']
3636

3737
expect(splitter).to respond_to(*stderr_methods)
3838
end

0 commit comments

Comments
 (0)