Skip to content

Commit

Permalink
Add coverage for fiber profiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 13, 2025
1 parent 13c6efa commit 14fa787
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,15 @@ jobs:
ruby: "3.3"
selector: EPoll
- os: ubuntu
ruby: "3.3"
ruby: "3.4"
selector: EPoll
- os: ubuntu
ruby: "3.4"
selector: URing
- os: ubuntu
ruby: "3.4"
selector: URing
fiber_profile_capture: "true"
- os: ubuntu
ruby: "head"
selector: URing
Expand All @@ -51,13 +58,14 @@ jobs:
env:
IO_EVENT_SELECTOR: ${{matrix.selector}}
ASYNC_SCHEDULER_DEFAULT_WORKER_POOL: ${{matrix.worker_pool}}
FIBER_PROFILER_CAPTURE: ${{matrix.fiber_profile_capture}}
run: bundle exec bake test

- uses: actions/upload-artifact@v4
with:
include-hidden-files: true
if-no-files-found: error
name: coverage-${{matrix.os}}-${{matrix.ruby}}-${{matrix.selector}}-${{matrix.worker_pool}}
name: coverage-${{matrix.os}}-${{matrix.ruby}}-${{matrix.selector}}-${{matrix.worker_pool}}-${{matrix.fiber_profile_capture}}
path: .covered.db

validate:
Expand Down
6 changes: 5 additions & 1 deletion gems.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
gemspec

# gem "io-event", git: "https://github.com/socketry/io-event.git"
gem "fiber-profiler"

# In order to capture both code paths in coverage, we need to optionally load this gem:
if ENV["FIBER_PROFILER_CAPTURE"]
gem "fiber-profiler"
end

group :maintenance, optional: true do
gem "bake-gem"
Expand Down

0 comments on commit 14fa787

Please sign in to comment.