Skip to content

Commit 8dfdd9c

Browse files
yhk1038claude
andcommitted
chore: switch from Codecov to Coveralls
- Add coveralls_reborn and simplecov-lcov gems - Update spec_helper.rb with Coveralls formatter - Update CI workflow to use COVERALLS_REPO_TOKEN - Update README badges to use Coveralls 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 746a583 commit 8dfdd9c

6 files changed

Lines changed: 23 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,10 @@ jobs:
7272
bundler-cache: true
7373

7474
- name: Run tests with coverage
75-
run: |
76-
COVERAGE=true bundle exec rspec
75+
run: bundle exec rspec
7776
env:
7877
COVERAGE: true
79-
80-
- name: Upload coverage to Codecov
81-
uses: codecov/codecov-action@v4
82-
with:
83-
token: ${{ secrets.CODECOV_TOKEN }}
84-
files: ./coverage/coverage.xml
85-
fail_ci_if_error: false
86-
verbose: true
78+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
8779

8880
# VSCode 플러그인 빌드
8981
vscode:

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ group :development, :test do
1010
gem "rspec_junit_formatter", "~> 0.6.0"
1111
gem "rubocop", require: false
1212
gem "simplecov", "~> 0.22.0", require: false
13-
gem "simplecov-cobertura", "~> 2.1.0", require: false
13+
gem "simplecov-lcov", "~> 0.8.0", require: false
14+
gem "coveralls_reborn", "~> 0.28.0", require: false
1415
end

README.ja.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<img src="https://img.shields.io/badge/ruby-3.0+-cc342d" alt="Ruby 3.0+" />
1414
<a href="https://rubygems.org/gems/t-ruby"><img src="https://img.shields.io/gem/v/t-ruby" alt="Gem Version" /></a>
1515
<img src="https://img.shields.io/gem/dt/t-ruby" alt="Downloads" />
16-
<a href="https://codecov.io/gh/type-ruby/t-ruby"><img src="https://codecov.io/gh/type-ruby/t-ruby/branch/main/graph/badge.svg" alt="Coverage" /></a>
16+
<a href="https://coveralls.io/github/type-ruby/t-ruby?branch=main"><img src="https://coveralls.io/repos/github/type-ruby/t-ruby/badge.svg?branch=main" alt="Coverage" /></a>
1717
</p>
1818

1919
<p align="center">

README.ko.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<img src="https://img.shields.io/badge/ruby-3.0+-cc342d" alt="Ruby 3.0+" />
1414
<a href="https://rubygems.org/gems/t-ruby"><img src="https://img.shields.io/gem/v/t-ruby" alt="Gem Version" /></a>
1515
<img src="https://img.shields.io/gem/dt/t-ruby" alt="Downloads" />
16-
<a href="https://codecov.io/gh/type-ruby/t-ruby"><img src="https://codecov.io/gh/type-ruby/t-ruby/branch/main/graph/badge.svg" alt="Coverage" /></a>
16+
<a href="https://coveralls.io/github/type-ruby/t-ruby?branch=main"><img src="https://coveralls.io/repos/github/type-ruby/t-ruby/badge.svg?branch=main" alt="Coverage" /></a>
1717
</p>
1818

1919
<p align="center">

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<img src="https://img.shields.io/badge/ruby-3.0+-cc342d" alt="Ruby 3.0+" />
1414
<a href="https://rubygems.org/gems/t-ruby"><img src="https://img.shields.io/gem/v/t-ruby" alt="Gem Version" /></a>
1515
<img src="https://img.shields.io/gem/dt/t-ruby" alt="Downloads" />
16-
<a href="https://codecov.io/gh/type-ruby/t-ruby"><img src="https://codecov.io/gh/type-ruby/t-ruby/branch/main/graph/badge.svg" alt="Coverage" /></a>
16+
<a href="https://coveralls.io/github/type-ruby/t-ruby?branch=main"><img src="https://coveralls.io/repos/github/type-ruby/t-ruby/badge.svg?branch=main" alt="Coverage" /></a>
1717
</p>
1818

1919
<p align="center">

spec/spec_helper.rb

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@
99

1010
formatters = [SimpleCov::Formatter::HTMLFormatter]
1111

12-
# Only add Cobertura formatter if it loads successfully
13-
begin
14-
require "simplecov-cobertura"
15-
formatters << SimpleCov::Formatter::CoberturaFormatter
16-
rescue LoadError
17-
# simplecov-cobertura not available
12+
# Add Coveralls formatter for CI
13+
if ENV["CI"]
14+
begin
15+
require "simplecov-lcov"
16+
require "coveralls_reborn"
17+
18+
SimpleCov::Formatter::LcovFormatter.config do |c|
19+
c.report_with_single_file = true
20+
c.single_report_path = "coverage/lcov.info"
21+
end
22+
23+
formatters << SimpleCov::Formatter::LcovFormatter
24+
formatters << Coveralls::SimpleCov::Formatter
25+
rescue LoadError
26+
# coveralls not available
27+
end
1828
end
1929

2030
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)

0 commit comments

Comments
 (0)