From a1538e49f2ff0a07864ad5745dd945fd6462e891 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/test.yml | 7 +++++++ README.md | 2 ++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7207133..f1e0688 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,4 +12,11 @@ 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: | + export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" + ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}} 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)