Skip to content

Commit

Permalink
fix: update SimpleCov and Code Climate coverage configuration
Browse files Browse the repository at this point in the history
- Replace JSONFormatter with built-in SimpleCov formatters
- Use MultiFormatter with SimpleFormatter and HTMLFormatter
- Simplify Code Climate reporter command format
- Remove redundant output path specification
  • Loading branch information
OlegPhenomenon committed Jan 20, 2025
1 parent 0a1bc6e commit b3e8a52
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
bundle exec rspec
./cc-test-reporter format-coverage --input-type simplecov --output coverage/codeclimate.json coverage/.resultset.json
./cc-test-reporter format-coverage coverage/.resultset.json --input-type simplecov
./cc-test-reporter upload-coverage
- uses: actions/[email protected]
Expand Down
8 changes: 5 additions & 3 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
add_filter %r{^/db/}
add_filter %r{^/vendor/}

# Specify the correct output format
coverage_dir 'coverage'
formatter SimpleCov::Formatter::JSONFormatter
# Use the default formatter instead of JSONFormatter
formatter SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::SimpleFormatter,
SimpleCov::Formatter::HTMLFormatter
])
end
puts "required simplecov"

Expand Down

0 comments on commit b3e8a52

Please sign in to comment.