Skip to content

Latest commit

 

History

History
120 lines (80 loc) · 3.34 KB

README.md

File metadata and controls

120 lines (80 loc) · 3.34 KB

Open Coverage

opencoverage build license dockerapi dockerfront

Free and open source alternative providing coverage reporting and diff coverage reporting.

The project can be simple replacement for Codecov or Coveralls for teams working on private repositories.

(some of the enterprise option pricing seemed a little unreasonable)

Features:

  • Coverage reporting
  • Diff coverage reporting
  • GitHub integration: PRs, comments
  • Codecov CLI compatible

Requirements:

  • SQLAlchemy compatible backend(PostgreSQL, SQLite, MySQL, etc)
  • Open Coverage backend
  • Open Coverage frontend

SCM integrations:

  • GitHub
  • Bitbucket
  • GitLab

Prerequisites

Please make sure that you have the following dependencies installed

Development

Getting started

You can use docker-compose to start Open Coverage.

docker-compose up

This will start the backend, frontend, PostgreSQL and NGINX. If you want to change to another supported database you have to adjust the docker-compose.yaml file.

Depending on your machine and internet connection is can take a moment till everything is running. Once docker-compose is ready you can browse to http://localhost:3000/ to checkout the frontend and documentation.

Open Coverage Frontend Picture

Configuration

To run the server yourself, you need to create a GitHub application and install it for your organization.

All configuration is done with env variables.

  • host
  • port
  • public_url
  • root_path: root path api is served from
  • dsn: connection string for backend database
  • cors: hosts frontend runs on
  • scm: enum(github)
  • github_app_id: ID of app
  • github_app_pem_file: pem file for application you created
  • github_default_installation_id: ID of org this app is installed on

Backend development

Develop:

make install-dev

Tests:

Run docker compose first:

docker-compose up postgres
make test

Run:

make run

Frontend development

This project uses Next.js. See the app directory for details.

Send report from CI

The backend is compatible with the Codecov CLI.

You need to provide the installation id of your org as the --token value or dummy if you are using the github_default_installation_id setting and only using the server for a single org.

codecov --url="http://<installed-host>:8000" --token=<github installation id> --slug=vangheem/opencoverage