Skip to content

Commit

Permalink
Tests: added coverage
Browse files Browse the repository at this point in the history
Use Code Climate for maintainability and coverage reports.
  • Loading branch information
Alexander-Senko committed Oct 10, 2024
1 parent 4df261a commit 0aa5829
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task
run: bundle exec rake
- uses: paambaati/codeclimate-action@master
env:
CC_TEST_REPORTER_ID: ce74ee3bee3aafbc805ece084e5e9a497bad09b089e2a7529e6087f926bc6f71
with:
coverageCommand: bundle exec rake
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ gem 'rake'
group :test do
gem 'rspec'
gem 'rspec-its'

gem 'simplecov', require: false
end

group :development do
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Magic::Lookup

TODO: Delete this and the text below, and describe your gem

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/magic/lookup`. To experiment with that code, run `bin/console` for an interactive prompt.
![Code Climate maintainability](
https://img.shields.io/codeclimate/maintainability-percentage/Alexander-Senko/magic-lookup
)
![Code Climate coverage](
https://img.shields.io/codeclimate/coverage/Alexander-Senko/magic-lookup
)

## Installation

Expand Down
5 changes: 5 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# frozen_string_literal: true

require 'rspec/its'
require 'simplecov'

SimpleCov.start do
add_filter 'spec'
end

require 'magic/lookup'

Expand Down

0 comments on commit 0aa5829

Please sign in to comment.