Skip to content
This documentation applies to Codacy Self-hosted v4.0.1

For the latest updates and improvements, see the latest Cloud documentation instead.

Alternative ways of running Coverage Reporter#

The recommended way to run Codacy Coverage Reporter is using a self-contained script that automatically downloads and runs the most recent version of Codacy Coverage Reporter:

  • On Ubuntu, run:

    bash <(curl -Ls
  • On Alpine Linux, run:

    wget -qO - | sh

The self-contained script can cache the binary. To avoid downloading the binary every time that the script runs, add one of the following directories to your CI cached folders:

  • $HOME/.cache/codacy on Linux
  • $HOME/Library/Caches/Codacy on Mac OS X

To use a specific version of the Codacy Coverage Reporter, set the following environment variable to one of the released versions:


The sections below provide details on alternative ways to run or install Codacy Coverage Reporter.


You can use Docker to run Codacy Coverage Reporter:

docker run -v $PWD:/code codacy/codacy-coverage-reporter:<version> report

Manually downloading the binary#

Linux amd64#

If you prefer, you can manually download and run the native codacy-coverage-reporter binary, either for the latest version or a specific one.

You can use the scripts below to automatically check for the latest version of the binaries, download the binaries from either Codacy's public store or GitHub, and run them.

  • Using Codacy's public S3:

    LATEST_VERSION="$(curl -Ls"
    curl -Ls -o codacy-coverage-reporter "${LATEST_VERSION}/codacy-coverage-reporter-linux"
    chmod +x codacy-coverage-reporter
    ./codacy-coverage-reporter report
  • Using GitHub:

    curl -Ls -o codacy-coverage-reporter "$(curl -Ls | jq -r '.assets | map({name, browser_download_url} | select(.name | contains("codacy-coverage-reporter-linux"))) | .[0].browser_download_url')"
    chmod +x codacy-coverage-reporter
    ./codacy-coverage-reporter report


Use the Java binary to run Codacy Coverage reporter on other platforms, such as Linux x86, macOS, Windows, etc.

You can use the scripts below to automatically check for the latest version of the Java binaries, download the binaries from either Codacy's public store or GitHub, and run them.

  • Using Codacy's public store:

    LATEST_VERSION="$(curl -Ls"
    curl -Ls -o codacy-coverage-reporter-assembly.jar "${LATEST_VERSION}/codacy-coverage-reporter-assembly.jar"
    java -jar codacy-coverage-reporter-assembly.jar report
  • Using GitHub:

    curl -LS -o codacy-coverage-reporter-assembly.jar "$(curl -LSs | jq -r '.assets | map({name, browser_download_url} | select(.name | endswith(".jar"))) | .[0].browser_download_url')"
    java -jar codacy-coverage-reporter-assembly.jar report

Building from source#

If you are having any issues with your installation, you can also build the coverage reporter from source.

  1. Clone the Codacy Coverage Reporter repository:

    git clone
  2. Run the command sbt assembly inside the local repository folder:

    cd codacy-coverage-reporter
    sbt assembly

    This will produce a file target/codacy-coverage-reporter-assembly-<version>.jar that you can run.

  3. Execute this .jar in the repository where you want to upload the coverage. For example:

    <path>/java-project$ java -jar ../codacy-coverage-reporter/target/codacy-coverage-reporter-assembly-<version>.jar report

CircleCI orb#

If you are using CircleCI to report coverage, you can use our orb codacy/coverage-reporter.

GitHub Action#

If you are using GitHub Actions to report coverage, you can use our GitHub Action codacy/codacy-coverage-reporter-action.

Community supported alternatives#

Maven plugin#

Thanks to the amazing job of Gavin Mogan you can now send your coverage to Codacy using his Maven plugin halkeye/codacy-maven-plugin! Be sure to follow the instructions on his repository.

Travis CI#

If you are using Travis CI to report coverage, update your file .travis.yml to include the following blocks:

  - bash <(curl -Ls download

  - bash <(curl -Ls

Make sure that you also set your project or account API Token as an environment variable in your Travis CI job.

Gradle task#

A big shout-out to Tom Howard, who suggested a way to create a Gradle task.

task uploadCoverageToCodacy(type: JavaExec, dependsOn : jacocoTestReport) {
   main = "com.codacy.CodacyCoverageReporter"
   classpath = configurations.codacy
   args = [

task (codacyDepsize) << {
def size = 0;
configurations.codacy.collect { it.length() / (1024 * 1024) }.each { size += it }
println "Total dependencies size: ${Math.round(size * 100) / 100} Mb"

        .sort { -it.length() }
        .each { println "${} : ${Math.round(it.length() / (1024) * 100) / 100} kb" }

task (codacyLocs) << {
    configurations.codacy.each {
        String jarName = it
        println jarName

The following Gradle task by Ramil Khamitov was based on the solution above.

configurations { codacy }
repositories {
dependencies {
    codacy 'com.codacy:codacy-coverage-reporter:latest.release'
task sendCoverageToCodacy(type: JavaExec, dependsOn: jacocoTestReport) {
    main = "com.codacy.CodacyCoverageReporter"
    classpath = configurations.codacy
    args = [

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact

Last modified April 17, 2021