Skip to content

Commit 3eee14f

Browse files
committed
Fix CI: replace require_relative with require in -e context
require_relative cannot infer basepath when used in ruby -e, causing LoadError. Using require instead works with the -Itest load path. https://claude.ai/code/session_01CvCNpdSjh1STBdmS9n5DN9
1 parent be6c17d commit 3eee14f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
ruby-version: ${{ matrix.ruby-version }}
2525

2626
- name: Run tests
27-
run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require_relative f }"
27+
run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require f }"
2828

2929
- name: Verify gem builds
3030
run: gem build ipdata.gemspec

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
ruby-version: "3.3"
7676

7777
- name: Run tests
78-
run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require_relative f }"
78+
run: ruby -Ilib -Itest -e "Dir['test/test_*.rb'].each { |f| require f }"
7979

8080
- name: Build gem
8181
run: gem build ipdata.gemspec

0 commit comments

Comments
 (0)