From 13c36a9587bd876a895ed80527c3b2c7cb53055f Mon Sep 17 00:00:00 2001 From: "Michael J. Giarlo" Date: Fri, 31 Jan 2025 11:19:31 -0800 Subject: [PATCH] Switch from CodeClimate to CodeCov --- .circleci/config.yml | 3 ++- .codecov.yml | 4 ++++ README.md | 4 +--- spec/rails_helper.rb | 6 ++++++ 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .codecov.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index eb798ddc4..d680dfb0a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,6 @@ version: 2.1 orbs: - ruby-rails: sul-dlss/ruby-rails@4.3.0 + ruby-rails: sul-dlss/ruby-rails@4.4.0 workflows: build: jobs: @@ -13,6 +13,7 @@ workflows: name: test api-only: true context: dlss + use-codecov: true - ruby-rails/docker-publish: context: dlss name: publish-latest diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..7a4ec7c50 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,4 @@ +comment: false +coverage: + status: + project: true diff --git a/README.md b/README.md index 281e91a85..53e156007 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ [![CircleCI](https://circleci.com/gh/sul-dlss/dor-services-app.svg?style=svg)](https://circleci.com/gh/sul-dlss/dor-services-app) -[![Maintainability](https://api.codeclimate.com/v1/badges/955223f2386ae5f10e33/maintainability)](https://codeclimate.com/github/sul-dlss/dor-services-app/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/955223f2386ae5f10e33/test_coverage)](https://codeclimate.com/github/sul-dlss/dor-services-app/test_coverage) +[![codecov](https://codecov.io/github/sul-dlss/dor-services-app/graph/badge.svg?token=MCMiin7aeE)](https://codecov.io/github/sul-dlss/dor-services-app) [![GitHub version](https://badge.fury.io/gh/sul-dlss%2Fdor-services-app.svg)](https://badge.fury.io/gh/sul-dlss%2Fdor-services-app) [![OpenAPI Validator](https://validator.swagger.io/validator?url=https://raw.githubusercontent.com/sul-dlss/dor-services-app/main/openapi.yml)](http://validator.swagger.io/validator/debug?url=https://raw.githubusercontent.com/sul-dlss/dor-services-app/main/openapi.yml) @@ -244,4 +243,3 @@ Additional notes: ### Steps 1. [Reset the database](https://github.com/sul-dlss/DeveloperPlaybook/blob/main/best-practices/db_reset.md) - diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3cc007c49..65e1b611c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -6,6 +6,12 @@ add_filter '/bin/' add_filter '/app/reports/' add_filter '/db/' + + if ENV['CI'] + require 'simplecov_json_formatter' + + formatter SimpleCov::Formatter::JSONFormatter + end end # This file is copied to spec/ when you run 'rails generate rspec:install'