github.com/covergates/covergates@v0.2.2-0.20201009050117-42ef8a19fb95/README.md (about) 1 <h1> <img src="https://covergates.com/logo.png" alt="logo" width="48" height=48> Covergates - Portal Gates to Coverage Reports</h1> 2 3 [![badge](https://covergates.com/api/v1/reports/bsi5dvi23akg00a0tgl0/badge?)](https://covergates.com/report/github/covergates/covergates) 4 ![CI](https://github.com/covergates/covergates/workflows/CI/badge.svg) 5 [![Go Report Card](https://goreportcard.com/badge/github.com/covergates/covergates)](https://goreportcard.com/report/github.com/covergates/covergates) 6 [![PkgGoDev](https://pkg.go.dev/badge/github.com/covergates/covergates)](https://pkg.go.dev/github.com/covergates/covergates) 7 [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) 8 [![CLA assistant](https://cla-assistant.io/readme/badge/covergates/covergates)](https://cla-assistant.io/covergates/covergates) 9 [![Twitter Follow](https://img.shields.io/twitter/follow/covergates_tw.svg?style=social)](https://twitter.com/covergates_tw) 10 11 [![card](https://covergates.com/api/v1/reports/bsi5dvi23akg00a0tgl0/card)](https://covergates.com/report/github/covergates/covergates) 12 13 ## Purpose 14 15 **Covergates** is to make the easiest way to setup a self-hosted coverage report service. 16 It's an alternative to services, such as: 17 18 - [Code Climate](https://codeclimate.com/) 19 - [Codecov](https://codecov.io/) 20 - [Coveralls](https://coveralls.io/) 21 22 The reason why this project is because managing coverage reports for private repositories should not be hard! 23 It is able to link with your self-hosted Git service. 24 Use it to improve coding review and quality management flow for your internal projects. 25 Want to try? Visit [covergates.com](https://covergates.com) before you starting. 26 27 ## Using 28 29 To get started, please download prebuilt binary [covergates-**version**-**platform**-**architecture**.zip](https://github.com/covergates/covergates/releases) and try: 30 31 ```sh 32 unzip covergates-<version>-<platform>-<architecture>.zip 33 ./covergates-server 34 ``` 35 36 Visit [http://localhost:8080](http://localhost:8080) for your **covergates** service. 37 38 To upload report, run `covergate` cli: 39 40 ```sh 41 export API_URL=http://localhost:8080/api/v1 42 covergates upload -report <report id> -type go coverage.out 43 ``` 44 45 ## Configure 46 47 `covergates-server` uses environment variables to change configurations. 48 Below is the list of variables for basic configuration: 49 50 - `GATES_SERVER_ADDR` Default `http://localhost:8080` 51 - `GATES_SERVER_BASE` Default `/` 52 - `GATES_DB_DRIVER` Default `sqlite3`. Other options are `postgres` and `cloudrun` 53 - `GATES_DB_HOST` Required host for `postgres` and `cloudrun` 54 - `GATES_DB_PORT` Required port for `postgres` and `cloudrun` 55 - `GATES_DB_USER` Required user for`postgres` and `cloudrun` 56 - `GATES_DB_NAME` Required database name for `postgres` and `cloudrun` 57 - `GATES_DB_PASSWORD` Required password for `postgres` and `cloudrun` 58 - `GATES_GITEA_SERVER` Default `https://try.gitea.io/`, gitea server address 59 - `GATES_GITEA_CLIENT_ID` Required for Gitea OAuth login 60 - `GATES_GITEA_CLIENT_SECRET` Required for Gitea OAuth login 61 - `GATES_GITHUB_SERVER` Default `https://github.com` 62 - `GATES_GITHUB_API_SERVER` Default `https://api.github.com` 63 - `GATES_GITHUB_CLIENT_ID` Required for GitHub OAuth login 64 - `GATES_GITHUB_CLIENT_SECRET` Required for GitHub OAuth login 65 66 ## Supported SCM and Language 67 68 | SCM | Supported | 69 | --------- | ------------------ | 70 | GitHub | :heavy_check_mark: | 71 | Gitea | :heavy_check_mark: | 72 | GitLab | :heavy_check_mark: | 73 | Gogs | :x: | 74 | Bitbucket | :x: | 75 76 | Language | Supported | Tutorial | 77 | ------------------------- | ------------------ | ------------------------------------------------------ | 78 | Go | :heavy_check_mark: | [go-example](https://github.com/covergates/go-example) | 79 | Perl | :heavy_check_mark: | :wrench:, ongoing | 80 | Python | :heavy_check_mark: | :wrench:, ongoing | 81 | Ruby (SimpleCov: RSpec) | :heavy_check_mark: | :heavy_minus_sign: | 82 | lcov (C, C++, Javascript) | :heavy_check_mark: | :heavy_minus_sign: | 83 | Clover (PHP) | :heavy_check_mark: | :heavy_minus_sign: | 84 | Java (Jacoco) | :wrench:, ongoing | :heavy_minus_sign: | 85 86 **Covergates** is at an early development stage. 87 Other languages and SCM support is ongoing! 88 If you would like to assist with development, please refer to [Contributing Section](#contributing). 89 90 ## Development 91 92 The build is split into `backend`, `cli` and `frontend`. To build backend, run: 93 94 ```sh 95 go build -o covergates-server ./cmd/server 96 ``` 97 98 To build CLI, run: 99 100 ```sh 101 export SERVER_API_URL=http://localhost:8080/api/v1 102 go build -o covergates -ldflags="-X main.CoverGatesAPI=$SERVER_API_URL" ./cmd/cli 103 ``` 104 105 You may change `SERVER_API_URL` to your self-hosted **covergates-server** address. 106 107 If your are behind firewall or proxy, 108 you may also download source package with `vendor` modules from [covergates.**version**.src.zip 109 ](https://github.com/covergates/covergates/releases). To build with `vendor` modules, run: 110 111 ``` 112 go build -o covergates-server -mod vendor ./cmd/server 113 ``` 114 115 To build frontend, it requires: 116 117 1. [Node.js v12](https://nodejs.org/en/download/) 118 2. [togo](https://github.com/bradrydzewski/togo) 119 120 Read [web/README.md](https://github.com/covergates/covergates/blob/master/web/README.md) for more details. 121 122 ## Contributing 123 124 It would be highly appreciated if you could contribute to the project. 125 There are many ways in which you can participate in the project: 126 127 1. Contributing directly to the code base 128 129 The expected workflow is [GitHub flow](https://guides.github.com/introduction/flow/). 130 Read [CONTRIBUTING.md](https://github.com/covergates/covergates/blob/master/CONTRIBUTING.md) before getting start. 131 132 2. [Submit feature requests and bugs](https://github.com/covergates/covergates/issues) 133 134 Especially for the new language support. 135 It would be great if you could provide coverage report examples and how to produce coverage for other languages. 136 137 3. Testing, both unit testing and e2e testing are welcome. 138 139 ## Further Information 140 141 For more information and tutorial about self-hosted Covergates server, please refer to our [documentation](https://docs.covergates.com/) 142 143 ## Milestones 144 145 Refer to [TODO.md](https://github.com/covergates/covergates/blob/master/TODO.md) for details. 146 147 ## License 148 149 This project is licensed under the GNU General Public License v3.0. See the [LICENSE](https://github.com/covergates/covergates/blob/master/LICENSE) file for the full license text. 150 151 ## Screenshots 152 153 ![report](https://raw.githubusercontent.com/covergates/brand/master/screenshots/covergates.png) 154 155 ![files](https://raw.githubusercontent.com/covergates/brand/master/screenshots/covergates_code.png) 156 157 ![setting](https://raw.githubusercontent.com/covergates/brand/master/screenshots/covergates_setting.png) 158 159 ![pull request](https://raw.githubusercontent.com/covergates/brand/master/screenshots/covergates_pr.png)