Skip to content

Commit f8f1953

Browse files
author
Mattia Roccoberton
committed
Setup Code Climate
1 parent ce6aea7 commit f8f1953

16 files changed

Lines changed: 53 additions & 8 deletions

.github/workflows/specs_postgres_70.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ jobs:
5757
- name: Run tests
5858
run: bundle exec rspec --profile
5959

60+
- name: Code Climate test coverage
61+
uses: paambaati/codeclimate-action@v3.0.0
62+
env:
63+
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
64+
with:
65+
coverageLocations: |
66+
${{github.workspace}}/coverage/lcov/active_storage_db.lcov:lcov
67+
6068
# - name: Upload coverage results
6169
# uses: actions/upload-artifact@master
6270
# if: always()

Gemfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
66
gemspec
77

88
group :development, :test do
9-
gem 'capybara'
109
gem 'mysql2' if ENV['DB_TEST'] == 'mysql'
1110
gem 'pg' if ['postgres', 'postgresql'].include? ENV['DB_TEST']
11+
gem 'simplecov'
12+
gem 'simplecov-lcov'
13+
14+
# Testing
15+
gem 'capybara'
1216
gem 'rspec_junit_formatter'
1317
gem 'rspec-rails'
1418
gem 'selenium-webdriver'
15-
gem 'simplecov'
1619

1720
# Linters
1821
gem 'brakeman'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Active Storage DB
22

33
[![gem version](https://badge.fury.io/rb/active_storage_db.svg)](https://badge.fury.io/rb/active_storage_db)
4+
[![gem downloads](https://badgen.net/rubygems/dt/active_storage_db)](https://rubygems.org/gems/active_storage_db)
5+
[![maintainability](https://api.codeclimate.com/v1/badges/92e1e703c308744a0f66/maintainability)](https://codeclimate.com/github/blocknotes/active_storage_db/maintainability)
6+
47
[![linters](https://github.com/blocknotes/active_storage_db/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/linters.yml)
58
[![specs Postgres](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_70.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_postgres_70.yml)
69
[![Specs MySQL](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_70.yml/badge.svg)](https://github.com/blocknotes/active_storage_db/actions/workflows/specs_mysql_70.yml)

gemfiles/rails_6_0_mysql.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ gem "mysql2"
66
gem "rails", "~> 6.0.0"
77

88
group :development, :test do
9+
gem "simplecov"
10+
gem "simplecov-lcov"
911
gem "capybara"
1012
gem "rspec_junit_formatter"
1113
gem "rspec-rails"
1214
gem "selenium-webdriver"
13-
gem "simplecov"
1415
gem "brakeman"
1516
gem "fasterer"
1617
gem "reek"

gemfiles/rails_6_0_mysql.gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ GEM
220220
simplecov-html (~> 0.11)
221221
simplecov_json_formatter (~> 0.1)
222222
simplecov-html (0.12.3)
223+
simplecov-lcov (0.8.0)
223224
simplecov_json_formatter (0.1.4)
224225
sprockets (4.0.2)
225226
concurrent-ruby (~> 1.0)
@@ -264,6 +265,7 @@ DEPENDENCIES
264265
rubocop-rspec
265266
selenium-webdriver
266267
simplecov
268+
simplecov-lcov
267269

268270
BUNDLED WITH
269271
2.3.8

gemfiles/rails_6_0_postgres.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ gem "pg"
66
gem "rails", "~> 6.0.0"
77

88
group :development, :test do
9+
gem "simplecov"
10+
gem "simplecov-lcov"
911
gem "capybara"
1012
gem "rspec_junit_formatter"
1113
gem "rspec-rails"
1214
gem "selenium-webdriver"
13-
gem "simplecov"
1415
gem "brakeman"
1516
gem "fasterer"
1617
gem "reek"

gemfiles/rails_6_0_postgres.gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ GEM
220220
simplecov-html (~> 0.11)
221221
simplecov_json_formatter (~> 0.1)
222222
simplecov-html (0.12.3)
223+
simplecov-lcov (0.8.0)
223224
simplecov_json_formatter (0.1.4)
224225
sprockets (4.0.2)
225226
concurrent-ruby (~> 1.0)
@@ -264,6 +265,7 @@ DEPENDENCIES
264265
rubocop-rspec
265266
selenium-webdriver
266267
simplecov
268+
simplecov-lcov
267269

268270
BUNDLED WITH
269271
2.3.8

gemfiles/rails_6_1_mysql.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ gem "mysql2"
66
gem "rails", "~> 6.1.0"
77

88
group :development, :test do
9+
gem "simplecov"
10+
gem "simplecov-lcov"
911
gem "capybara"
1012
gem "rspec_junit_formatter"
1113
gem "rspec-rails"
1214
gem "selenium-webdriver"
13-
gem "simplecov"
1415
gem "brakeman"
1516
gem "fasterer"
1617
gem "reek"

gemfiles/rails_6_1_mysql.gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ GEM
224224
simplecov-html (~> 0.11)
225225
simplecov_json_formatter (~> 0.1)
226226
simplecov-html (0.12.3)
227+
simplecov-lcov (0.8.0)
227228
simplecov_json_formatter (0.1.4)
228229
sprockets (4.0.2)
229230
concurrent-ruby (~> 1.0)
@@ -267,6 +268,7 @@ DEPENDENCIES
267268
rubocop-rspec
268269
selenium-webdriver
269270
simplecov
271+
simplecov-lcov
270272

271273
BUNDLED WITH
272274
2.3.8

gemfiles/rails_6_1_postgres.gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ gem "pg"
66
gem "rails", "~> 6.1.0"
77

88
group :development, :test do
9+
gem "simplecov"
10+
gem "simplecov-lcov"
911
gem "capybara"
1012
gem "rspec_junit_formatter"
1113
gem "rspec-rails"
1214
gem "selenium-webdriver"
13-
gem "simplecov"
1415
gem "brakeman"
1516
gem "fasterer"
1617
gem "reek"

0 commit comments

Comments
 (0)