Skip to content

Commit

Permalink
Remove simplecov
Browse files Browse the repository at this point in the history
  • Loading branch information
laurajaime committed Oct 1, 2024
1 parent ab31f3e commit 7d62fbf
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 136 deletions.
16 changes: 1 addition & 15 deletions .github/workflows/challenges_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,10 @@ jobs:
bundle exec rails decidim_challenges:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run RSpec
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: CI=1 CHALLENGES_SIMPLECOV=1 bundle exec rspec --backtrace spec/system/decidim/challenges

- name: Publish code coverage
run: |
cp coverage/coverage.xml cobertura.xml
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r "$CC_TEST_REPORTER_ID" -t cobertura
env:
CC_TEST_REPORTER_ID: 91564b5d6fef4bea80bbc8e50bf97bfadd95bf460fd7d3f563d0f39a57c16cdc
command: bundle exec rspec --backtrace spec/system/decidim/challenges
16 changes: 1 addition & 15 deletions .github/workflows/problems_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,10 @@ jobs:
bundle exec rails decidim_challenges:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run RSpec
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: CI=1 CHALLENGES_SIMPLECOV=1 bundle exec rake --backtrace spec/system/decidim/problems

- name: Publish code coverage
run: |
cp coverage/coverage.xml cobertura.xml
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r "$CC_TEST_REPORTER_ID" -t cobertura
env:
CC_TEST_REPORTER_ID: 91564b5d6fef4bea80bbc8e50bf97bfadd95bf460fd7d3f563d0f39a57c16cdc
command: bundle exec rspec --backtrace spec/system/decidim/problems
16 changes: 1 addition & 15 deletions .github/workflows/sgds_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,10 @@ jobs:
bundle exec rails decidim_challenges:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run RSpec
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: CI=1 CHALLENGES_SIMPLECOV=1 bundle exec rake --backtrace spec/system/decidim/sgds

- name: Publish code coverage
run: |
cp coverage/coverage.xml cobertura.xml
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r "$CC_TEST_REPORTER_ID" -t cobertura
env:
CC_TEST_REPORTER_ID: 91564b5d6fef4bea80bbc8e50bf97bfadd95bf460fd7d3f563d0f39a57c16cdc
command: bundle exec rspec --backtrace spec/system/decidim/sdgs
16 changes: 1 addition & 15 deletions .github/workflows/solutions_system_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,10 @@ jobs:
bundle exec rails decidim_challenges:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run RSpec
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: CI=1 CHALLENGES_SIMPLECOV=1 bundle exec rake --backtrace spec/system/decidim/solutions

- name: Publish code coverage
run: |
cp coverage/coverage.xml cobertura.xml
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r "$CC_TEST_REPORTER_ID" -t cobertura
env:
CC_TEST_REPORTER_ID: 91564b5d6fef4bea80bbc8e50bf97bfadd95bf460fd7d3f563d0f39a57c16cdc
command: bundle exec rspec --backtrace spec/system/decidim/solutions
16 changes: 1 addition & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,10 @@ jobs:
bundle exec rails decidim_challenges:install:migrations
RAILS_ENV=test bundle exec rails db:migrate
- name: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run RSpec
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
retry_on: error
command: CI=1 CHALLENGES_SIMPLECOV=1 bundle exec rspec --exclude-pattern "spec/system/**/*_spec.rb"

- name: Publish code coverage
run: |
cp coverage/coverage.xml cobertura.xml
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r "$CC_TEST_REPORTER_ID" -t cobertura
env:
CC_TEST_REPORTER_ID: 91564b5d6fef4bea80bbc8e50bf97bfadd95bf460fd7d3f563d0f39a57c16cdc
command: bundle exec rspec --exclude-pattern "spec/system/**/*_spec.rb"
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ require: rubocop-rspec
AllCops:
NewCops: enable
Include:
- .simplecov
- "**/*.rb"
- "**/*.rake"
- "**/*.gemspec"
Expand Down
32 changes: 0 additions & 32 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,3 @@
Decidim::Dev.dummy_app_path = File.expand_path(File.join("spec", "decidim_dummy_app"))

require "decidim/dev/test/base_spec_helper"

if ENV["CHALLENGES_SIMPLECOV"]
require "simplecov"
SimpleCov.start do
# `ENGINE_ROOT` holds the name of the engine we're testing.
# This brings us to the main Decidim folder.
root File.expand_path(".", ENV.fetch("ENGINE_ROOT", nil))

# We make sure we track all Ruby files, to avoid skipping unrequired files
# We need to include the `../` section, otherwise it only tracks files from the
# `ENGINE_ROOT` folder for some reason.
# track_files "../**/*.rb"

# We ignore some of the files because they are never tested
add_filter "/config/"
add_filter "/db/"
add_filter "/vendor/"
add_filter "/spec/"
add_filter "/test/"
add_filter %r{^/decidim-[^/]*/lib/decidim/[^/]*/engine.rb}
add_filter %r{^/decidim-[^/]*/lib/decidim/[^/]*/admin-engine.rb}
add_filter %r{^/decidim-[^/]*/lib/decidim/[^/]*/component.rb}
add_filter %r{^/decidim-[^/]*/lib/decidim/[^/]*/participatory_space.rb}
end

SimpleCov.merge_timeout 1800

if ENV["CI"]
require "simplecov-cobertura"
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
end
end
28 changes: 0 additions & 28 deletions spec/system/decidim/solutions/create_solutions_spec.rb

This file was deleted.

0 comments on commit 7d62fbf

Please sign in to comment.