Covergates is to make the easiest way to setup a self-hosted coverage report service. It's an alternative to services, such as:
The reason why this project is because managing coverage reports for private repositories should not be hard! It is able to link with your self-hosted Git service. Use it to improve coding review and quality management flow for your internal projects. Want to try? Visit covergates.com before you starting.
To get started, please download prebuilt binary covergates-version-platform-architecture.zip and try:
unzip covergates-<version>-<platform>-<architecture>.zip
./covergates-server
Visit http://localhost:8080 for your covergates service.
To upload report, run covergate
cli:
export API_URL=http://localhost:8080/api/v1
covergates upload -report <report id> -type go coverage.out
covergates-server
uses environment variables to change configurations.
Below is the list of variables for basic configuration:
GATES_SERVER_ADDR
Defaulthttp://localhost:8080
GATES_SERVER_BASE
Default/
GATES_DB_DRIVER
Defaultsqlite3
. Other options arepostgres
andcloudrun
GATES_DB_HOST
Required host forpostgres
andcloudrun
GATES_DB_PORT
Required port forpostgres
andcloudrun
GATES_DB_USER
Required user forpostgres
andcloudrun
GATES_DB_NAME
Required database name forpostgres
andcloudrun
GATES_DB_PASSWORD
Required password forpostgres
andcloudrun
GATES_GITEA_SERVER
Defaulthttps://try.gitea.io/
, gitea server addressGATES_GITEA_CLIENT_ID
Required for Gitea OAuth loginGATES_GITEA_CLIENT_SECRET
Required for Gitea OAuth loginGATES_GITHUB_SERVER
Defaulthttps://github.com
GATES_GITHUB_API_SERVER
Defaulthttps://api.github.com
GATES_GITHUB_CLIENT_ID
Required for GitHub OAuth loginGATES_GITHUB_CLIENT_SECRET
Required for GitHub OAuth login
SCM | Supported |
---|---|
GitHub | ✔️ |
Gitea | ✔️ |
GitLab | ✔️ |
Gogs | ❌ |
Bitbucket | ❌ |
Language | Supported | Tutorial |
---|---|---|
Go | ✔️ | go-example |
Perl | ✔️ | 🔧, ongoing |
Python | ✔️ | 🔧, ongoing |
Ruby (SimpleCov: RSpec) | ✔️ | ➖ |
lcov (C, C++, Javascript) | ✔️ | ➖ |
Clover (PHP) | ✔️ | ➖ |
Java (Jacoco) | 🔧, ongoing | ➖ |
Covergates is at an early development stage. Other languages and SCM support is ongoing! If you would like to assist with development, please refer to Contributing Section.
The build is split into backend
, cli
and frontend
. To build backend, run:
go build -o covergates-server ./cmd/server
To build CLI, run:
export SERVER_API_URL=http://localhost:8080/api/v1
go build -o covergates -ldflags="-X main.CoverGatesAPI=$SERVER_API_URL" ./cmd/cli
You may change SERVER_API_URL
to your self-hosted covergates-server address.
If your are behind firewall or proxy,
you may also download source package with vendor
modules from covergates.version.src.zip
. To build with vendor
modules, run:
go build -o covergates-server -mod vendor ./cmd/server
To build frontend, it requires:
Read web/README.md for more details.
It would be highly appreciated if you could contribute to the project. There are many ways in which you can participate in the project:
-
Contributing directly to the code base
The expected workflow is GitHub flow. Read CONTRIBUTING.md before getting start.
-
Submit feature requests and bugs
Especially for the new language support. It would be great if you could provide coverage report examples and how to produce coverage for other languages.
-
Testing, both unit testing and e2e testing are welcome.
For more information and tutorial about self-hosted Covergates server, please refer to our documentation
Refer to TODO.md for details.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for the full license text.