Skip to content

Commit

Permalink
Add test coverage (code climate)
Browse files Browse the repository at this point in the history
  • Loading branch information
serradura committed Jan 24, 2024
1 parent d7a797f commit c9187d1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,36 @@ on:
pull_request:

jobs:
build:
test:
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }}
strategy:
matrix:
ruby: [2.7, 3.0, 3.1, 3.2, 3.3, head]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests (Minitest)
run: bundle exec rake test
- name: Run BCDD::Result.configuration test (Minitest)
run: bundle exec rake test_configuration TEST_CONFIG_FREEZING=true

- name: Run BCDD::Result.transitions test (Minitest)
run: bundle exec rake test_transitions_duration BCDD_RESULT_TEST_TRANSITIONS_DURATION=true

- name: Run tests (Minitest)
run: bundle exec rake test

- name: Run static code analysis (Rubocop)
run: bundle exec rake rubocop

- name: Run static type checking (Steep)
run: bundle exec steep check
if: ${{ matrix.ruby == 3.2 }}

- uses: paambaati/codeclimate-action@v5
if: ${{ matrix.ruby == 3.2 }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<img src="https://img.shields.io/badge/ruby->%3D%202.7.0-ruby.svg?colorA=99004d&colorB=cc0066" alt="Ruby">
<a href="https://rubygems.org/gems/bcdd-result"><img src="https://badge.fury.io/rb/bcdd-result.svg" alt="bcdd-result gem version" height="18"></a>
<a href="https://codeclimate.com/github/B-CDD/result/maintainability"><img src="https://api.codeclimate.com/v1/badges/aa8360f8f012d7dedd62/maintainability" /></a>
<a href="https://codeclimate.com/github/B-CDD/result/test_coverage"><img src="https://api.codeclimate.com/v1/badges/aa8360f8f012d7dedd62/test_coverage" /></a>
</p>
</p>

Expand Down Expand Up @@ -2290,7 +2291,7 @@ end

## About

[Rodrigo Serradura](https://github.com/serradura) created this project. He is the B/CDD process/method creator and has already made similar gems like the [u-case](https://github.com/serradura/u-case) and [kind](https://github.com/serradura/kind/blob/main/lib/kind/result.rb). This gem is a general-purpose abstraction/monad, but it also contains key features that serve as facilitators for adopting B/CDD in the code.
[Rodrigo Serradura](https://github.com/serradura) created this project. He is the B/CDD process/method creator and has already made similar gems like the [u-case](https://github.com/serradura/u-case) and [kind](https://github.com/serradura/kind/blob/main/lib/kind/result.rb). This gem can be used independently, but it also contains essential features that facilitate the adoption of B/CDD in code.

<p align="right"><a href="#-bcddresult">⬆️ &nbsp;back to top</a></p>

Expand Down
2 changes: 1 addition & 1 deletion Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target :lib do
# check 'app/models/**/*.rb' # Glob
# ignore 'lib/templates/*.rb'

library 'singleton', 'securerandom' # Standard libraries
library 'singleton' # Standard libraries
# library 'strong_json' # Gems

# configure_code_diagnostics(D::Ruby.default) # `default` diagnostics setting (applies by default)
Expand Down

0 comments on commit c9187d1

Please sign in to comment.