Skip to content

Commit 14fa787

Browse files
committed
Add coverage for fiber profiler.
1 parent 13c6efa commit 14fa787

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/test-coverage.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,15 @@ jobs:
2727
ruby: "3.3"
2828
selector: EPoll
2929
- os: ubuntu
30-
ruby: "3.3"
30+
ruby: "3.4"
31+
selector: EPoll
32+
- os: ubuntu
33+
ruby: "3.4"
34+
selector: URing
35+
- os: ubuntu
36+
ruby: "3.4"
3137
selector: URing
38+
fiber_profile_capture: "true"
3239
- os: ubuntu
3340
ruby: "head"
3441
selector: URing
@@ -51,13 +58,14 @@ jobs:
5158
env:
5259
IO_EVENT_SELECTOR: ${{matrix.selector}}
5360
ASYNC_SCHEDULER_DEFAULT_WORKER_POOL: ${{matrix.worker_pool}}
61+
FIBER_PROFILER_CAPTURE: ${{matrix.fiber_profile_capture}}
5462
run: bundle exec bake test
5563

5664
- uses: actions/upload-artifact@v4
5765
with:
5866
include-hidden-files: true
5967
if-no-files-found: error
60-
name: coverage-${{matrix.os}}-${{matrix.ruby}}-${{matrix.selector}}-${{matrix.worker_pool}}
68+
name: coverage-${{matrix.os}}-${{matrix.ruby}}-${{matrix.selector}}-${{matrix.worker_pool}}-${{matrix.fiber_profile_capture}}
6169
path: .covered.db
6270

6371
validate:

gems.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
gemspec
1111

1212
# gem "io-event", git: "https://github.com/socketry/io-event.git"
13-
gem "fiber-profiler"
13+
14+
# In order to capture both code paths in coverage, we need to optionally load this gem:
15+
if ENV["FIBER_PROFILER_CAPTURE"]
16+
gem "fiber-profiler"
17+
end
1418

1519
group :maintenance, optional: true do
1620
gem "bake-gem"

0 commit comments

Comments
 (0)