Are you running your tests outside of your root directory? You may need to use the --prefix option.
Are you working with a Docker container? Check out this doc.
Coverage data is based on the data that you send us via your coverage payloads, which is created client-side.
Try removing Code Climate from the equation:
(1) Look at coverage results locally. Are they what you expect?
(2) Are your results what you expect, regardless of Code Climate?
(3) How are they different while looking at Code Climate?
Self help from technical documentation
Output debug messages to your CI using the --debug flag with your cc-test-reporter.
View uploaded reports (with potential errors) in the Code Climate UI. These can be found under the Recent Reports section at the following URL: codeclimate.com/repos/repo#/settings/test_reporter
Search the test reporter GitHub project for specific error messages.
Read the test reporter's README for detailed instructions and low level usage commands.
Check out the sample/working test config files on the test reporter GitHub project here.
Ask a question and open an issue on the test reporter repo itself.
Opening an Issue or contacting Support?
If you use single, parallel or multi-suite builds
A copy of your CI configuration file
Output from your CI when using the --debugflag in your CI configuration
I see a "successfully sent" message in my CI, but no results show in Code Climate's UI.
In order to coverage info in the Code Climate UI, you'll need to send a test report for your default branch. If you've only setup the test reporter on a feature branch, then reports won't be uploaded for the default branch. If you're successfully uploaded reports, but still not seeing coverage info in the UI, it's most likely because you haven't yet sent a test report for the default branch. Coverage info for non-default branches is visible in GitHub using the browser extension.
Possibly due to malformed payloads. Head to codeclimate.com/repos/repo#/settings/test_reporter to view a list of uploaded reports and potential errors. Add the --debug flag to view additional output.
Make sure that you're sending ENV (not Git) values. See this doc
Check to see if you're pinning to a specific test coverage reporter version.
Where should I put the --debug flag?
If you're running your tests in single builds, use after-build --debug.
For tests run in parallel, please use both format-coverage --debug and upload-coverage --debug.
What CI-specific environmental variables and calls should I use?
Although the same basic variables are needed, we've found that each CI's naming of variables and calls can be quite different.
Check our CI sample config files in our help docs here as well as in the test reporter project.
The reporter is unable to find a file referenced with the test report. Does that file exist within your git repository? Was your test suite run within a different filesystem (such as in a docker container)?
For example, if you're running the tests within a docker container and your app code is located at /usr/src/app, the reporter run outside of the docker container will not be able to find files at the same absolute path.
Pass --prefix /usr/src/app to instruct the test reporter to strip the unknown base path.
Invalid path part
Most often, this is related to:
The reporter not able to find your test coverage results to upload them to Code Climate.
The reporter encountering a file that it can't process
For #1, adding the -- prefix option to make the path mentioned relative to the project root.
For #2, try excluding the mentioned file from your test coverage payloads. If you need the coverage results of that file, contact us and we'll help.
Error: not find any viable formatter. available formatters: simplecov, lcov, coverage.py, clover, gocov, gcov, cobertura, jacoco
The reporter is unable to find a formatter.
This is often seen with Java projects, when the the path to source code can't be inferred.