danhper/opencov
{ "createdAt": "2015-10-21T11:02:09Z", "defaultBranch": "master", "description": "Open source code coverage history webapp", "fullName": "danhper/opencov", "homepage": "http://demo.opencov.com", "language": "Elixir", "name": "opencov", "pushedAt": "2022-07-01T01:49:08Z", "stargazersCount": 323, "topics": [], "updatedAt": "2025-10-25T00:05:16Z", "url": "https://github.com/danhper/opencov"}OpenCov
Section titled “OpenCov”OpenCov is a self-hosted opensource test coverage history viewer. It is (mostly) compatible with coveralls, so most coverage tools will work easily.
Demo and screenshots
Section titled “Demo and screenshots”A demo is available at http://demo.opencov.com, you can create an account or login with
- username: user@opencov.com
- password: password123
For “security” reasons, the user is not admin. NOTE: the demo is on a Heroku free dyno, so it may not always be available and might be very slow.
Projects list
Section titled “Projects list”
Project page
Section titled “Project page”
Build page
Section titled “Build page”
Coverage page
Section titled “Coverage page”
Admin panel
Section titled “Admin panel”
Deploying the application
Section titled “Deploying the application”Configuring
Section titled “Configuring”First, you will need to at least setup a database
To configure the app, create a local.exs file and override the configuration you need.
Check config/local.sample.exs to see the available configurations.
Using docker
Section titled “Using docker”With an existing database
Section titled “With an existing database”If you already have a database to use, you can simply start the application using docker:
Setup database, run migrations and seeds
$ docker run --rm -v /absolute/path/to/local.exs:/opencov/config/local.exs danhper/opencov mix ecto.setupExecute Phoenix Server
$ docker run -v /absolute/path/to/local.exs:/opencov/config/local.exs danhper/opencovThis will start the server on the port you set in local.exs.
With docker-compose
Section titled “With docker-compose”If you do not have a database, you can start one with docker and docker-compose. See docker-compose.yml for a sample docker-compose.yml file.
Once you have your docker-compose.yml and local.exs ready, you can run
$ docker-compose run opencov mix ecto.setup$ docker-compose upManually
Section titled “Manually”$ git clone https://github.com/danhper/opencov.git$ cd opencov$ cp /path/to/local.exs config/local.exs # local.exs must be in the `config` directory of the app
$ npm install # (or yarn install)$ mix deps.get$ mix ecto.setup$ mix phoenix.serverThis should start OpenCov at port 4000.
If you want to setup the server for production, you will need to run the above commands
with MIX_ENV=prod and to run
$ mix assets.compilebefore starting the server.
Deploying to Heroku
Section titled “Deploying to Heroku”You should also be able to deploy to Heroku by simply git pushing this repository.
You will need to set the following environment variables using heroku config:set
OPENCOV_PORTOPENCOV_SCHEMESECRET_KEY_BASESMTP_USERSMTP_PASSWORD
You will need to run
$ heroku run mix ecto.setupbefore you can use your application.
Default user
Section titled “Default user”In all setups, mix ecto.setup creates the following admin user
- email: admin@example.com
- password: p4ssw0rd
You should use it for your first login and the change the email and password.
Sending test metrics
Section titled “Sending test metrics”A few languages are documented in the wiki. For other languages, coveralls instructions should work out of the box, you just need to set the URL to your OpenCov server and to explicitly set the token, even when using Travis.
Development status
Section titled “Development status”The application is more or less stable. I have been using it for a little while now with coverage data from the 4 languages in the Wiki.
The main missing feature is the ability to send coverage status on pull requests. The implementation is started in the integrations branch but I could not find the time to finish it yet.
I am open to any other suggestions, and help is very welcome.