Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Coverage

on: [push, pull_request]

env:
COVERAGE: PartialSummary
CONSOLE_OUTPUT: Text

jobs:
test:
name: ${{matrix.ruby}} on ${{matrix.os}}
runs-on: ${{matrix.os}}-latest

strategy:
matrix:
os:
- ubuntu
- macos

ruby:
- "3.1"

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
bundler-cache: true

- name: Run tests
timeout-minutes: 5
run: bundle exec rspec

- uses: actions/upload-artifact@v2
with:
name: coverage-${{matrix.os}}-${{matrix.ruby}}
path: .covered.db

validate:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true

- uses: actions/download-artifact@v3

- name: Validate coverage
timeout-minutes: 5
run: bundle exec bake covered:validate --paths */.covered.db \;
2 changes: 1 addition & 1 deletion .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
experimental: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- "head"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
9 changes: 7 additions & 2 deletions spec/async/wrapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,16 @@
describe '#wait_priority' do
let(:pipe) {::Socket.pair(:UNIX, :STREAM)}

it "can wait to be priority" do
it "can invoke wait_priority on the underlying io" do
expect(output.io).to receive(:wait_priority).and_return(true)
output.wait_priority
end

it "can wait for out of band data" do
begin
# I've tested this successfully on Linux but it fails on Darwin.
input.io.send('!', Socket::MSG_OOB)
rescue Errno::EOPNOTSUPP => error
rescue => error
skip error.message
end

Expand Down