Skip to content

Commit

Permalink
Upgrade simplecov (#216)
Browse files Browse the repository at this point in the history
* Upgrade simplecov

* Require json formatter

* make rubocop happy

* Let's try

* test github action

* fix inputs

* try a different approach 👀

* remove unnecessary code
  • Loading branch information
leticiaoliveira5 authored Feb 18, 2025
1 parent f8dd33e commit ce84062
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
run: |
bundle exec rake db:schema:load
bundle exec rspec --format documentation --require rails_helper
- name: Publish code coverage
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: 11390e99ff161ee53c4476bafb1fecfaca3efa634567ff188fcf3a49a3319553
rubocop:
name: rubocop
runs-on: ubuntu-latest
Expand Down
5 changes: 0 additions & 5 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ blocks:
- name: RSpec
task:
env_vars:
- name: CC_TEST_REPORTER_ID
value: 11390e99ff161ee53c4476bafb1fecfaca3efa634567ff188fcf3a49a3319553
- name: DATABASE_URL
value: postgres://postgres@localhost:5432/db_test
jobs:
Expand All @@ -25,6 +23,3 @@ blocks:
- bin/rails db:create RAILS_ENV=test
- bundle exec rake db:schema:load
- bundle exec rspec --format documentation --require rails_helper
- chmod +x ./cc-test-reporter
- ./cc-test-reporter format-coverage coverage/.resultset.json --input-type 'simplecov'
- ./cc-test-reporter upload-coverage
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ group :test do
gem 'capybara', '~> 3.40'
gem 'rails-controller-testing'
gem 'shoulda-matchers', '~> 4.0'
gem 'simplecov', '~> 0.13.0', require: false
gem 'simplecov', '~> 0.21.2', require: false
end

group :development do
Expand Down
16 changes: 8 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ GEM
responders
warden (~> 1.2.3)
diff-lcs (1.5.1)
docile (1.1.5)
docile (1.4.1)
drb (2.2.1)
enumerate_it (4.0.0)
activesupport (>= 6.0.0)
Expand All @@ -146,7 +146,6 @@ GEM
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.6.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
Expand Down Expand Up @@ -316,11 +315,12 @@ GEM
simple_form (5.3.1)
actionpack (>= 5.2)
activemodel (>= 5.2)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -388,7 +388,7 @@ DEPENDENCIES
sass-rails
shoulda-matchers (~> 4.0)
simple_form (~> 5.3)
simplecov (~> 0.13.0)
simplecov (~> 0.21.2)
spring
spring-watcher-listen (~> 2.0.0)
tzinfo-data
Expand Down
Binary file removed cc-test-reporter
Binary file not shown.
3 changes: 3 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

require 'simplecov'
require 'simplecov_json_formatter'

SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
SimpleCov.start do
add_filter '/spec/'
end
Expand Down

0 comments on commit ce84062

Please sign in to comment.