Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Add multi-file coverage parsing #24

Merged
merged 2 commits into from
Aug 25, 2016
Merged

Conversation

spresse1
Copy link

@spresse1 spresse1 commented Jun 8, 2016

Merging cobertura XML is hard - there isn't a utility to do it. Unfortunately, while working in a repo of mine, I had to use two different test harnesses (one for python, one for JS - see https://github.com/spresse1/remote_thermostat). Both can output to xml, but have no other common formats. The codacy API appears to only retain the last coverage report uploaded.

Based on this situation, I decided it would be best to give the python uploader the ability to merge multiple XML input files.

This implementation merges the python structure that is turned into JSON before uploading. This means that if, in the future, the uploader adds additional supported input formats, this code can be used to perform merges over multiple formats.

This PR is fully backwards compatible (at least according to the tests). I've also added tests for the new functionality.

Comments and requests for revision are absolutely welcome.

@pedrorijo91
Copy link

Hi @spresse1,

Codacy should allow you to send one coverage report by commit and by language. Meaning that you should be able to send us a coverage report for JS and another for python, and Codacy would take care of merging the coverage information.

If you think that is not happening, ping us on the support chat (as soon as you login you will see on the bottom right a help button), so that we can check what's happening please.

@pedrorijo91
Copy link

Hi @spresse1

Were you able to check my previous suggestion regarding the upload of one coverage report by language?

@mrfyda mrfyda merged commit deb2e05 into archived-codacy:master Aug 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants