Skip to content

Commit

Permalink
Change codecov with coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
fblupi committed Dec 5, 2024
1 parent fc8d612 commit d41f6cb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,12 @@ jobs:
DATABASE_PASSWORD: postgres

- name: Run RSpec
run: CODECOV=1 bundle exec rspec
run: CI=1 bundle exec rspec
env:
RAILS_ENV: test
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ group :production do
end

group :test do
gem "codecov", require: false
gem "coveralls_reborn", require: false
gem "database_cleaner"
end
16 changes: 13 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ GEM
html_tokenizer (~> 0.0.6)
parser (>= 2.4)
smart_properties
bigdecimal (3.1.8)
bindex (0.8.1)
bootsnap (1.10.3)
msgpack (~> 1.2)
Expand Down Expand Up @@ -170,8 +171,6 @@ GEM
concurrent-ruby
childprocess (4.1.0)
chronic (0.10.2)
codecov (0.6.0)
simplecov (>= 0.15, < 0.22)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
coffee-rails (5.0.0)
Expand All @@ -191,6 +190,11 @@ GEM
country_select (4.0.0)
countries (~> 3.0)
sort_alphabetical (~> 1.0)
coveralls_reborn (0.25.0)
simplecov (>= 0.18.1, < 0.22.0)
term-ansicolor (~> 1.6)
thor (>= 0.20.3, < 2.0)
tins (~> 1.16)
crack (0.4.5)
rexml
crass (1.0.6)
Expand Down Expand Up @@ -839,13 +843,19 @@ GEM
sshkit-interactive (0.3.0)
sshkit (~> 1.12)
ssrf_filter (1.1.1)
sync (0.5.0)
temple (0.10.2)
term-ansicolor (1.11.2)
tins (~> 1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.2.1)
thread_safe (0.3.6)
tilt (2.2.0)
timeout (0.4.0)
tins (1.37.0)
bigdecimal
sync
tomlrb (2.0.3)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -919,7 +929,7 @@ DEPENDENCIES
capistrano-rails-console
capistrano-rbenv
capistrano-sidekiq
codecov
coveralls_reborn
database_cleaner
decidim (= 0.27.4)
decidim-centers (~> 0.2.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![[CI] Lint](https://github.com/Platoniq/participa-aneca/actions/workflows/lint.yml/badge.svg)](https://github.com/Platoniq/participa-aneca/actions/workflows/lint.yml)
[![[CI] Test](https://github.com/Platoniq/participa-aneca/actions/workflows/test.yml/badge.svg)](https://github.com/Platoniq/participa-aneca/actions/workflows/test.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/57cd5b8ca8064dfff86c/maintainability)](https://codeclimate.com/github/Platoniq/participa-aneca/maintainability)
[![codecov](https://codecov.io/gh/Platoniq/participa-aneca/branch/main/graph/badge.svg)](https://codecov.io/gh/Platoniq/participa-aneca)
[![Coverage Status](https://coveralls.io/repos/github/Platoniq/participa-aneca/badge.svg?branch=main)](https://coveralls.io/github/Platoniq/participa-aneca?branch=main)

Free Open-Source participatory democracy, citizen participation and open government for cities and organizations

Expand Down
7 changes: 5 additions & 2 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
ENV["RAILS_ENV"] ||= "test"

require "simplecov"
require "codecov"

SimpleCov.start "rails"
SimpleCov.formatter = SimpleCov::Formatter::Codecov if ENV["CODECOV"]

if ENV["CI"]
require "coveralls"
SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end

require File.expand_path("../config/environment", __dir__)

Expand Down

0 comments on commit d41f6cb

Please sign in to comment.