Skip to content

Commit cdba027

Browse files
committed
ci: add a Windows build with minimal MRI Ruby to the "Continuous Integration" build matrix
1 parent 90e183e commit cdba027

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

.github/workflows/continuous_integration.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
workflow_dispatch:
88

99
# Supported platforms / Ruby versions:
10-
# - Ubuntu: MRI (3.2, 3.3, 3.4), TruffleRuby (24), JRuby (9.4)
10+
# - Ubuntu: MRI (3.2, 3.3, 3.4)
1111
# - Windows: MRI (3.2)
1212

1313
jobs:
@@ -30,6 +30,10 @@ jobs:
3030
ruby: ["3.2", "3.4"]
3131
operating-system: [ubuntu-latest]
3232
fail_on_low_coverage: [true]
33+
include:
34+
- # Only test with minimal Ruby version on Windows
35+
ruby: 3.2
36+
operating-system: windows-latest
3337

3438
steps:
3539
- name: Checkout

spec/rspec/path_matchers/be_dir_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@
215215
end
216216

217217
describe 'the mode: option' do
218+
before(:all) do
219+
skip 'File mode tests are only applicable on Unix-like platforms' unless UNIX_LIKE_PLATFORM
220+
end
221+
218222
subject { expect(path).to be_dir(mode: expected_mode) }
219223

220224
before { FileUtils.mkdir(path) }

spec/rspec/path_matchers/be_file_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,10 @@
572572
end
573573

574574
describe 'the mode: option' do
575+
before(:all) do
576+
skip 'File mode tests are only applicable on Unix-like platforms' unless UNIX_LIKE_PLATFORM
577+
end
578+
575579
subject { expect(path).to be_file(mode: expected_mode) }
576580

577581
before { FileUtils.touch(path) }

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
end
2020

2121
# Guard for Unix-specific tests, as Windows does not have the same ownership concepts
22-
UNIX_PLATFORM = RUBY_PLATFORM !~ /cygwin|mswin|mingw|bccwin|wince|emx/
22+
UNIX_LIKE_PLATFORM = RUBY_PLATFORM !~ /cygwin|mswin|mingw|bccwin|wince|emx/
2323

2424
# Helper method to get the current user for ownership tests
2525
def current_user

0 commit comments

Comments
 (0)