File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff 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
1415end
Original file line number Diff line number Diff line change 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 " >
Original file line number Diff line number Diff line change 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 " >
Original file line number Diff line number Diff line change 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 " >
Original file line number Diff line number Diff line change 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 )
You can’t perform that action at this time.
0 commit comments