Skip to content

Commit c8d63ce

Browse files
committed
Add windows to CI matrix
1 parent 069b3a0 commit c8d63ce

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ jobs:
1717
matrix:
1818
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
1919
os: [ ubuntu-latest, macos-latest ]
20+
include:
21+
- os: windows-latest
22+
ruby: 2.6
23+
- os: windows-latest
24+
ruby: 3.4
2025
exclude:
2126
- os: macos-latest
2227
ruby: truffleruby

test/test_timeout.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,9 @@ def test_timeout_in_trap_handler
425425

426426
rd, wr = IO.pipe
427427

428-
trap("SIGUSR1") do
428+
signal = Signal.list["USR1"] ? :USR1 : :TERM
429+
430+
trap(signal) do
429431
begin
430432
Timeout.timeout(0.1) do
431433
sleep 1
@@ -440,9 +442,9 @@ def test_timeout_in_trap_handler
440442
end
441443
end
442444

443-
Process.kill :USR1, Process.pid
445+
Process.kill signal, Process.pid
444446

445447
assert_equal "OK", rd.read
446448
rd.close
447-
end if Signal.list["USR1"] # Windows has no SIGUSR1
449+
end
448450
end

0 commit comments

Comments
 (0)