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

Support uploading partial test coverage for distributed testing? #486

Open
schwern opened this issue Jan 26, 2022 · 0 comments
Open

Support uploading partial test coverage for distributed testing? #486

schwern opened this issue Jan 26, 2022 · 0 comments
Assignees

Comments

@schwern
Copy link

schwern commented Jan 26, 2022

Hi, I'm trying to get coverage reporting working with parallel testing on Heroku CI. Parallel testing on HerokuCI works by distributing the tests across multiple dynos each with their own ephemeral filesystem.

I could upload the test results to S3 as you suggest, but Heroku CI lacks a way to run a command when all the CI dynos have completed. I can't find where to put the command to sum-coverage and upload-coverage after all dynos have finished running (I'll contact support to ask).

Rather than having to push partial results to S3 and sum them, would it be possible to use cc-test-reporter to upload partial test reports directly to CC? For example, if I have 4 dynos running my tests in parallel I would do:

cc-test-reporter before-build
bundle exec parallel_rspec spec/ -n $CI_NODE_TOTAL --only-group $CI_NODE_INDEX
cc-test-reporter after-build --part $CI_NODE_INDEX --of $CI_NODE_TOTAL

Then Code Climate knows it has received, for example, part 3 of 4. Once it's received all 4 parts it does the sum itself.

This would make setting up distributed testing easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants