Skip to content

Commit

Permalink
Merge pull request #274 from meilisearch/add-code-cov
Browse files Browse the repository at this point in the history
Add codecov
  • Loading branch information
brunoocasali authored Aug 15, 2023
2 parents 4b77938 + 1780d31 commit 86d6aba
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run tests
run: bundle exec rspec
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

linter_check:
name: linter-check
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ group :test do
gem 'jdbc-sqlite3', platform: :jruby
gem 'rspec', '~> 3.0'
gem 'simplecov', require: 'false'
gem 'codecov', require: 'false'
gem 'threads'

gem 'byebug'
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

<p align="center">
<a href="https://github.com/meilisearch/meilisearch-rails/actions"><img src="https://github.com/meilisearch/meilisearch-rails/workflows/Tests/badge.svg" alt="Test"></a>
<a href="https://app.codecov.io/gh/meilisearch/meilisearch-rails/tree/main" >
<img src="https://codecov.io/gh/meilisearch/meilisearch-rails/branch/main/graph/badge.svg?token=9J7LRP11IR"/>
</a>
<a href="https://github.com/meilisearch/meilisearch-rails/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a>
<a href="https://ms-bors.herokuapp.com/repositories/68"><img src="https://bors.tech/images/badge_small.svg" alt="Bors enabled"></a>
</p>
Expand Down
5 changes: 4 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
ENV['RAILS_ENV'] ||= 'test'

require 'bundler/setup'

require 'simplecov'
require 'codecov'

SimpleCov.start do
add_filter %r{^/spec/}
minimum_coverage 86.70

formatter SimpleCov::Formatter::Codecov if ENV['CI']
end

require 'timeout'
Expand Down

0 comments on commit 86d6aba

Please sign in to comment.