From 766523bf4dd003cbe369730f0100cb493183f0d5 Mon Sep 17 00:00:00 2001 From: Wilson Silva Date: Fri, 6 Jan 2023 12:41:31 +0700 Subject: [PATCH] Setup CodeClimate's quality reporting --- .github/workflows/main.yml | 8 ++++++-- README.md | 2 ++ nostr.gemspec | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9541344..a46c096 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,5 +23,9 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - - name: Run the default task - run: bundle exec rake + - name: Test and report the code coverage + uses: paambaati/codeclimate-action@v3.2.0 + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + with: + coverageCommand: bundle exec rspec diff --git a/README.md b/README.md index 4be2383..49525fa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Nostr [![Gem Version](https://badge.fury.io/rb/nostr.svg)](https://badge.fury.io/rb/nostr) +[![Maintainability](https://api.codeclimate.com/v1/badges/c7633eb2c89eb95ee7f2/maintainability)](https://codeclimate.com/github/wilsonsilva/nostr/maintainability) +[![Test Coverage](https://api.codeclimate.com/v1/badges/c7633eb2c89eb95ee7f2/test_coverage)](https://codeclimate.com/github/wilsonsilva/nostr/test_coverage) [![Inline docs](http://inch-ci.org/github/wilsonsilva/nostr.svg?branch=main)](http://inch-ci.org/github/wilsonsilva/nostr) Nostr client. Please note that the API is likely to change as the gem is still in development and has not yet reached a diff --git a/nostr.gemspec b/nostr.gemspec index e364d49..48d6c12 100644 --- a/nostr.gemspec +++ b/nostr.gemspec @@ -44,7 +44,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop', '~> 1.42' spec.add_development_dependency 'rubocop-rake', '~> 0.6' spec.add_development_dependency 'rubocop-rspec', '2.16' - spec.add_development_dependency 'simplecov', '~> 0.22' + spec.add_development_dependency 'simplecov', '= 0.17' spec.add_development_dependency 'simplecov-console', '~> 0.9' spec.add_development_dependency 'yard', '~> 0.9' spec.add_development_dependency 'yard-junk', '~> 0.0.9'