Skip to content

Test coverage on conditional builds #257

Open
@mrcasals

Description

@mrcasals

Hi all!

I contacted CodeClimate support and they told me to come here and open an issue, so here I am 😄

I'm contacting you regarding your Test Coverage beta feature. I'm currently not using it, but would like feedback before working on it as my setup might be complex to handle.

Repo: https://github.com/decidim/decidim
RubyGems page: https://rubygems.org/gems/decidim
Ci: CircleCI (https://circleci.com/gh/decidim/workflows/decidim)
Builds: in parallel, using CircleCI's workflows
CI config file: https://github.com/decidim/decidim/blob/master/.circleci/config.yml
CodeClimate config file: https://github.com/decidim/decidim/blob/master/.codeclimate.yml

My repo is a monorepo handling multiple Ruby gems at once. Decidim is a metagem that includes all other subgems found in the repo. On CircleCI we're using their workflows feature to run each gem tests on a different job:

Workflow setup:

This means that every time we push some commits we run the full test suite, running the tests for all gems. Even if we modify only a gem without side effects. Even if we modify the README. To avoid this, I started working on a PR to skip job builds if the commit didn't modify any relevant file of a given gem:

decidim/decidim#2028

This would let us have quicker builds in general. But I realized that CodeCov, our current Test Coverage provider, doesn't know how to calculate the coverage for those gems that did not run their test suite.

Is there any way to solve this with your Test coverage feature? I see you have a way to handle multiple parallel builds, but as far as I know it is based on the fact that all test suites are actually run, which wouldn't be my case.

The only workaround I can think of is separating the project into multiple sub-projects (one project for each gem + one project for the metagem) on CodeClimate, can I have multiple projects on CodeClimate from a single GitHub repo?

Thank you so much for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions