All Projects → schrej → godacov

schrej / godacov

Licence: Apache-2.0 license
Command-line tool for publishing go test coverage reports to Codacy

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to godacov

codacy-scalameta
Codacy tool for Scalameta
Stars: ✭ 35 (+40%)
Mutual labels:  codacy
helm-ssm
Injects values from AWS SSM parameters on the values.yaml file
Stars: ✭ 43 (+72%)
Mutual labels:  codacy
cpp14-project-template
A simple, cross-platform, and continuously integrated C++14 project template
Stars: ✭ 64 (+156%)
Mutual labels:  codacy
DailyBugle
📰Modern MVVM Android application following single activity architecture which fetches news from 🕷️ news API. this repository contains some best practices ⚡ of android development
Stars: ✭ 17 (-32%)
Mutual labels:  codacy
daikon
Common modules shared by Talend applications
Stars: ✭ 14 (-44%)
Mutual labels:  codacy
spring-boot-template
Template for Spring Boot applications
Stars: ✭ 59 (+136%)
Mutual labels:  codacy
ruby-codacy-coverage
DEPRECATED Post coverage results to Codacy
Stars: ✭ 12 (-52%)
Mutual labels:  codacy

NOTE: Codacy now supports Golang coverage reports directly. This tool is therefore no longer required to submit coverage reports.


godacov FOSSA Status Security Rating

godacov is a command-line tool to publish test coverage reports generated with go test -coverprofile=<filename> to Codacy.

How to use

Install godacov using go get

$ go get github.com/schrej/godacov

Retrieve a project token from codacy from Your Project > Settings > Integrations > Project API.

Run your tests and generate the coverage report.


go test -coverprofile=coverage.out

Finally publish the results to Codacy using


godacov -t <project token> -r ./coverage.out -c <current commit id>

Travis CI

If you are using Travis CI you should add your project token as a secret environment variable, then run the following command in your script. Remember that you have to append -coverprofile=coverage.out to your test command.

godacov -t $CODACY_TOKEN -r ./coverage.out -c $TRAVIS_COMMIT

CLI Usage

Usage:
  godacov [flags]

Flags:
  -i, --allow-insecure    Allow insecure connection to base URL
  -a, --api-base string   The base URL of the codacy API server to use (default "https://api.codacy.com")
  -c, --commit string     The hash of the commit to provide coverage for
  -h, --help              help for godacov
  -r, --report string     coverage report file generated by 'go test'
  -t, --token string      Codacy project token

License

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].