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

Add coverage report badge using Codecov #3136

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

rubenochiavone
Copy link
Contributor

Description

Add code coverage report to whole project (not only for each sub-project) and code coverage badge to README.md.

Question

Fixes #3048

Checklist:

frontend/spec/spec_helper.rb Outdated Show resolved Hide resolved
core/spec/spec_helper.rb Outdated Show resolved Hide resolved
backend/spec/teaspoon_env.rb Outdated Show resolved Hide resolved
backend/spec/spec_helper.rb Outdated Show resolved Hide resolved
api/spec/spec_helper.rb Outdated Show resolved Hide resolved
@kennyadsl
Copy link
Member

@rubenochiavone I've set up a CODECOV_TOKEN env variable in CircleCI that should be visible in all builds but hidden publicly. Let me know if that works

@rubenochiavone
Copy link
Contributor Author

rubenochiavone commented Nov 23, 2020

Hi there 👋

It's been a while since I last worked on this PR, but I think it is OK for being reviewed now.

Things worth commenting on:

Current coverage report: codecov

On #3048 I mentioned that would be interesting to have a report once a PR is created. So to check that I created a test PR to assess coverage validation during PRs and it is working on my fork: rubenochiavone#1. Installing codecov app on the project already does it - https://docs.codecov.io/docs/team-bot.

Sorry for accidentally creating PR #3848 😬

@rubenochiavone rubenochiavone marked this pull request as ready for review November 23, 2020 01:38
@rubenochiavone rubenochiavone changed the title Add merged coverage report Add coverage report badge using Codecov Jul 5, 2021
@kennyadsl
Copy link
Member

Hey @rubenochiavone, thanks for resuming this work! Do you need anything from me to be changed in the CI (like adding secrets or stuff like that)?

@rubenochiavone
Copy link
Contributor Author

rubenochiavone commented Jul 6, 2021

Hi @kennyadsl, the token you configured was enough. Check out the coverage report here: https://codecov.io/github/rubenochiavone/solidus/commit/b342cd9123a4d831087f034de0d66acc1f805156. I think that this PR is ready for review. Please let me know if this PR needs more work.

@waiting-for-dev waiting-for-dev added the type:enhancement Proposed or newly added feature label Aug 25, 2022
@waiting-for-dev
Copy link
Contributor

Hey @rubenochiavone, I'm sorry it's been a while since we last moved it forward. Would you like to rebase it?

@waiting-for-dev waiting-for-dev added changelog:solidus_api Changes to the solidus_api gem changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem labels Aug 30, 2022
@rubenochiavone
Copy link
Contributor Author

Sure. 😃

@rubenochiavone
Copy link
Contributor Author

Hey @waiting-for-dev, besides the rebase, I had to rework the CI script to upload coverage data to codecov.io due to the deprecation of the codecov gem - see https://github.com/codecov/codecov-ruby#readme. The new codecov script also required a different coverage data format, thus I had to change it while generating results in CI.

Current coverage: codecov

Please let me know what you think about it.

@waiting-for-dev waiting-for-dev requested a review from a team September 8, 2022 07:51
@waiting-for-dev
Copy link
Contributor

Hey @rubenochiavone, thanks for your continuous work on it 🙌 It looks like there're still some conflicts to resolve.

Add code coverage report to the whole project (not only for each solidus gem)
and code coverage badge to README.md.

Add COVERAGE_DIR environment variable. This variable refers to the directory
that collects coverage results between each solidus gem test execution and then
will be used to calculate the combined coverage report.

Improve build script to report code coverage for all solidus gems by using
coverage rake task.
Copy link
Contributor

@waiting-for-dev waiting-for-dev left a comment

Choose a reason for hiding this comment

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

Many thanks!! 🙌

@waiting-for-dev waiting-for-dev merged commit b6a10b8 into solidusio:master Sep 13, 2022
@rubenochiavone rubenochiavone deleted the coverage branch September 13, 2022 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_api Changes to the solidus_api gem changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem type:enhancement Proposed or newly added feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Coverage report
4 participants