From 1bd88e204a134b72584968807406cfae7fde6c93 Mon Sep 17 00:00:00 2001 From: Erik Berlin Date: Tue, 21 May 2024 14:04:36 -0700 Subject: [PATCH] Add Maintainability and Test Coverage badges --- .github/workflows/lint.yml | 2 +- .github/workflows/mutant.yml | 2 +- .github/workflows/steep.yml | 2 +- .github/workflows/test.yml | 7 ++++++- README.md | 2 ++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 01821ad..1c1b36a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: Linter +name: linter on: [push, pull_request] jobs: build: diff --git a/.github/workflows/mutant.yml b/.github/workflows/mutant.yml index c82f5e3..e6bd92c 100644 --- a/.github/workflows/mutant.yml +++ b/.github/workflows/mutant.yml @@ -1,4 +1,4 @@ -name: Mutant +name: mutation testing on: [push, pull_request] jobs: build: diff --git a/.github/workflows/steep.yml b/.github/workflows/steep.yml index 713cf94..f1ebed7 100644 --- a/.github/workflows/steep.yml +++ b/.github/workflows/steep.yml @@ -1,4 +1,4 @@ -name: Type Checker +name: type checker on: [push, pull_request] jobs: build: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7207133..4b59c63 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Tests +name: tests on: [push, pull_request] jobs: build: @@ -12,4 +12,9 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + - run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + ./cc-test-reporter before-build - run: bundle exec rake test + - run: ./cc-test-reporter after-build -r 503b90af6f7d19fdb5efdfbebc093049baaf24fe6f15a206240ceef2a438620d diff --git a/README.md b/README.md index de288ad..3e3082b 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Linter](https://github.com/sferik/x-ruby/actions/workflows/lint.yml/badge.svg)](https://github.com/sferik/x-ruby/actions/workflows/lint.yml) [![Mutant](https://github.com/sferik/x-ruby/actions/workflows/mutant.yml/badge.svg)](https://github.com/sferik/x-ruby/actions/workflows/mutant.yml) [![Typer Checker](https://github.com/sferik/x-ruby/actions/workflows/steep.yml/badge.svg)](https://github.com/sferik/x-ruby/actions/workflows/steep.yml) +[![Test Coverage](https://api.codeclimate.com/v1/badges/40bbddf2c9170742ca9e/test_coverage)](https://codeclimate.com/github/sferik/x-ruby/test_coverage) +[![Maintainability](https://api.codeclimate.com/v1/badges/40bbddf2c9170742ca9e/maintainability)](https://codeclimate.com/github/sferik/x-ruby/maintainability) [![Gem Version](https://badge.fury.io/rb/x.svg)](https://rubygems.org/gems/x) # A [Ruby](https://www.ruby-lang.org) interface to the [X API](https://developer.x.com)