Skip to content

Instantly share code, notes, and snippets.

@mrcasals
Created October 31, 2017 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrcasals/4f34f2a64f4ad389e5b2e3b8d0c8f6bc to your computer and use it in GitHub Desktop.
Save mrcasals/4f34f2a64f4ad389e5b2e3b8d0c8f6bc to your computer and use it in GitHub Desktop.
CodeClimate help on Test coverage + conditional builds
Hi!
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. I couldn't find a GitHub repo for support, so I decided to contact you through here. If you think I should post this question somewhere else (StackOverflow for example, some repo that I might have missed...), please point me to the correct place so the community can benefit from this.
Repo: https://github.com/decidim/decidim
RubyGems page: https://rubygems.org/gems/decidim
Ci: CircleCI
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 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:
https://i.imgur.com/2Vh33sd.png
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:
https://github.com/decidim/decidim/pull/2028
This would let us to 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 it is based on the fact that all test suites are actually run, which isn't 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!
Marc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment