Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simplecov handling for codeclimate via GitHub Actions #532

Merged
merged 2 commits into from
Dec 14, 2021

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Dec 14, 2021

When running the tests, we need to make sure the CC_TEST_REPORTER_ID
value is present. This allows SimpleCov to generate the JSON payload
that is needed for Code Climate, as SimpleCov has special handling when
that env var is present.

Also fix calling of minitest based tests

When running the tests, we need to make sure the CC_TEST_REPORTER_ID
value is present. This allows SimpleCov to generate the JSON payload
that is needed for Code Climate, as SimpleCov has special handling when
that env var is present.
@miq-bot
Copy link
Member

miq-bot commented Dec 14, 2021

Checked commits Fryguy/manageiq-gems-pending@384249c~...40bbd9b with ruby 2.6.3, rubocop 1.13.0, haml-lint 0.35.0, and yamllint
4 files checked, 0 offenses detected
Everything looks fine. 🏆

@@ -1,5 +1,5 @@
require "simplecov"
SimpleCov.start { command_name "spec" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we needed these to prevent one test suite from overwriting all of the data from the previous one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps in the past, but the current version of SimpleCov automatically creates two sections named "RSpec" and "Unit tests" for rpsec and minitest respectively. This keeps the defaults, and then SimpleCov automatically merges them together into the JSON payload when it sees CC_TEST_REPORTER_ID as an env var.

@bdunne bdunne merged commit 3eef51f into ManageIQ:master Dec 14, 2021
@Fryguy Fryguy deleted the github_actions3 branch December 14, 2021 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants