Skip to content

Commit

Permalink
codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
tapan-sh committed Jan 17, 2025
1 parent 09984a8 commit c75f8cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 32 deletions.
31 changes: 2 additions & 29 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,16 @@ jobs:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
ruby-version: 2.4
bundler-cache: true

- name: Run tests
run: bundle exec rspec

- name: 'Upload Coverage Report'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ./coverage

- name: Code Coverage
uses: paambaati/codeclimate-action@v9.0.0
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
debug: true
coverageCommand: bundle exec rspec
coverageLocations: |
${{github.workspace}}/coverage/.resultset.json:simplecov
coverage:
needs: [ test ]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Coverage Report
uses: actions/download-artifact@v4
with:
name: coverage-report
path: ./coverage
- uses: paambaati/[email protected]
env:
# Set CC_TEST_REPORTER_ID as secret of your repo
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageCommand: bundle exec rspec
debug: true
2 changes: 1 addition & 1 deletion class_kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'simplecov', '~> 0.22.0'
spec.add_development_dependency 'simplecov', '< 0.18.0'
spec.add_development_dependency 'simplecov_json_formatter'

spec.add_dependency 'hash_kit'
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'simplecov'
require 'simplecov_json_formatter'
# require 'simplecov_json_formatter'

SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter
# SimpleCov.formatter = SimpleCov::Formatter::JSONFormatter

SimpleCov.start do
add_filter 'spec/'
Expand Down

0 comments on commit c75f8cf

Please sign in to comment.