Skip to content

Commit 53234e0

Browse files
authored
Merge pull request #471 from meilisearch/add-code-cov
Add codecov
2 parents 170bbe9 + b82998d commit 53234e0

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
3333
- name: Run test suite
3434
run: bundle exec rspec
35+
- name: Upload coverage reports to Codecov
36+
uses: codecov/codecov-action@v3
37+
env:
38+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3539

3640
linter_check:
3741
name: linter-check

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ group :development, :test do
1111
gem 'byebug'
1212
gem 'rspec', '~> 3.0'
1313
gem 'simplecov'
14+
gem 'codecov'
1415

1516
# Used only for testing, none of the classes are exposed to the public API.
1617
gem 'jwt'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<p align="center">
1818
<a href="https://badge.fury.io/rb/meilisearch"><img src="https://badge.fury.io/rb/meilisearch.svg" alt="Latest Stable Version"></a>
1919
<a href="https://github.com/meilisearch/meilisearch-ruby/actions"><img src="https://github.com/meilisearch/meilisearch-ruby/workflows/Tests/badge.svg" alt="Test"></a>
20+
<a href="https://codecov.io/gh/meilisearch/meilisearch-ruby">
21+
<img src="https://codecov.io/github/meilisearch/meilisearch-ruby/coverage.svg?branch=main" alt="Codecov">
22+
</a>
2023
<a href="https://github.com/meilisearch/meilisearch-ruby/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a>
2124
<a href="https://ms-bors.herokuapp.com/repositories/6"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a>
2225
</p>

spec/spec_helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
# it won't be able to track your files and their coverage!
2121
# The SimpleCov.start must be issued before any of your application code is required!
2222
require 'simplecov'
23+
require 'codecov'
24+
2325
SimpleCov.start do
2426
add_filter %r{^/spec/}
27+
formatter SimpleCov::Formatter::Codecov if ENV['CI']
2528
end
2629

2730
require 'meilisearch'

0 commit comments

Comments
 (0)