diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87d4574..9017e96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,3 +35,18 @@ jobs: ruby-version: "3.2" bundler-cache: true - run: bundle exec rubocop + + qlty: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0 + with: + ruby-version: '3.2' + bundler-cache: true + - name: Test + run: bundle exec rspec + - uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0 + with: + token: ${{ secrets.QLTY_COVERAGE_TOKEN }} + files: ./coverage/coverage.json diff --git a/README.md b/README.md index 84ed99d..9220f0e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Ruboty::Github -[![Gem Version](https://badge.fury.io/rb/ruboty-qiita-github.svg)](https://badge.fury.io/rb/ruboty-qiita-github) [![Test](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml) +[![Gem Version](https://badge.fury.io/rb/ruboty-qiita-github.svg)](https://badge.fury.io/rb/ruboty-qiita-github) +[![Test](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml) +[![Maintainability](https://qlty.sh/gh/increments/projects/ruboty-qiita-github/maintainability.svg)](https://qlty.sh/gh/increments/projects/ruboty-qiita-github) +[![Code Coverage](https://qlty.sh/gh/increments/projects/ruboty-qiita-github/coverage.svg)](https://qlty.sh/gh/increments/projects/ruboty-qiita-github) Manage GitHub via Ruboty. This gem adds `deploy pull request` command to original ruboty-github plugin. diff --git a/ruboty-github.gemspec b/ruboty-github.gemspec index 0194259..9715342 100644 --- a/ruboty-github.gemspec +++ b/ruboty-github.gemspec @@ -28,6 +28,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop-rake' spec.add_development_dependency 'rubocop-rspec' spec.add_development_dependency 'simplecov' + spec.add_development_dependency 'simplecov_json_formatter' spec.add_development_dependency 'webmock' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c96367a..b718404 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,16 @@ # frozen_string_literal: true require 'simplecov' -SimpleCov.start +require 'simplecov_json_formatter' + +SimpleCov.start do + SimpleCov.formatters = [ + SimpleCov::Formatter::JSONFormatter, + SimpleCov::Formatter::HTMLFormatter + ] + + add_filter '/spec/' +end require 'ruboty/github' require 'webmock/rspec'