Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Simplecov parallel and KnapsackPro not working properly in github actions #4

@celsoMartins

Description

@celsoMartins

Hi. First of all, thanks for this GEM.

I've tried several configurations but Simplecov parallel is still complaining about my test coverage.

Does Simplecov parallel work with KnapsackPro?

I'll add here my last attempt on spec_helper and the message.

Thanks.

ENV['RAILS_ENV'] ||= 'test'

require 'knapsack_pro'

require 'simplecov/parallel'

KnapsackPro::Hooks::Queue.before_queue do |_queue_id|
  SimpleCov::Parallel.activate
  SimpleCov.minimum_coverage 100
  SimpleCov.start do
    add_filter 'config/initializers/rack_profiler.rb'
  end

  SimpleCov.command_name("rspec_ci_node_#{KnapsackPro::Config::Env.ci_node_index}")
end

KnapsackPro::Adapters::RSpecAdapter.bind
Finished in 1 minute 21.14 seconds
559 examples, 0 failures, 1 pending
I, [2020-09-29T11:40:26.068446 #3361]  INFO -- : [knapsack_pro] To retry in development the tests for this CI node please run below command on your machine. It will run all tests in a single run. If you need to reproduce a particular subset of tests fetched from API queue then above after each request to Knapsack Pro API you will find example rspec command.
I, [2020-09-29T11:40:26.068543 #3361]  INFO -- : [knapsack_pro] bundle exec rspec --format progress  --default-path spec "spec/models/project_spec.rb" "spec/controllers/demands_controller_spec.rb" "spec/controllers/customers_controller_spec.rb" "spec/models/risk_review_spec.rb" "spec/adapters/highchart/project_statistics_charts_adapter_spec.rb" "spec/controllers/project_risk_configs_controller_spec.rb" "spec/controllers/slack_configurations_controller_spec.rb" "spec/services/demand_score_matrix_service_spec.rb" "spec/adapters/highchart/highchart_adapter_spec.rb" "spec/controllers/financial_informations_controller_spec.rb" "spec/controllers/jira/jira_custom_field_mappings_controller_spec.rb" "spec/models/flow/statistics_flow_informations_spec.rb" "spec/models/team_member_spec.rb" "spec/adapters/highchart/strategic_charts_adapter_spec.rb" "spec/models/flow/membership_flow_information_spec.rb" "spec/models/jira/jira_account_spec.rb" "spec/controllers/authenticated_controller_spec.rb" "spec/controllers/webhook_integrations_controller_spec.rb" "spec/services/service_delivery_review_service_spec.rb" "spec/adapters/highchart/finances_charts_adapter_spec.rb" "spec/models/slack_configuration_spec.rb"
D, [2020-09-29T11:40:26.540054 #3361] DEBUG -- : [knapsack_pro] POST https://api.knapsackpro.com/v1/build_subsets
D, [2020-09-29T11:40:26.540104 #3361] DEBUG -- : [knapsack_pro] API request UUID: 52b686ff-f483-446e-a7c6-67f2ab7ffdac
D, [2020-09-29T11:40:26.540126 #3361] DEBUG -- : [knapsack_pro] API response:
D, [2020-09-29T11:40:26.540429 #3361] DEBUG -- : [knapsack_pro] 
D, [2020-09-29T11:40:26.540541 #3361] DEBUG -- : [knapsack_pro] Saved time execution report on Knapsack Pro API server.
Line coverage (85.87%) is below the expected minimum coverage (100.00%).
Coverage report generated for rspec_ci_node_0 to /home/runner/work/flow_climate/flow_climate/coverage. 3807 / 4433 LOC (85.88%) covered.
SimpleCov failed with exit 2 due to a coverage related error
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions