Skip to content

Librecov/librecov

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibreCov

Build Status Coverage Status codecov codebeat badge

LibreCov is a self-hosted opensource test coverage history viewer. It is (mostly) compatible with coveralls, so most coverage tools will work easily.

Projects list

projects

Project page

project page

Build page

build page

Coverage page

coverage page

Admin panel

admin panel

Deploying the application

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

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:/librecov/config/local.exs yknx4/librecov mix ecto.setup

Execute Phoenix Server

docker run -v /absolute/path/to/local.exs:/librecov/config/local.exs yknx4/librecov

This will start the server on the port you set in local.exs.

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 librecov mix ecto.setup
docker-compose up

Manually

git clone https://github.com/yknx4/librecov.git
cd librecov
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.server

This should start LibreCov 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.compile

before starting the server.

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

  • LIBRECOV_PORT
  • LIBRECOV_SCHEME
  • SECRET_KEY_BASE
  • SMTP_USER
  • SMTP_PASSWORD

You will need to run

heroku run mix ecto.setup

before you can use your application.

Default user

In all setups, mix ecto.setup creates the following admin user

You should use it for your first login and the change the email and password.

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 LibreCov server and to explicitly set the token, even when using Travis.

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.

Packages

 
 
 

Languages

  • Elixir 87.6%
  • HTML 10.3%
  • Dockerfile 0.9%
  • TypeScript 0.9%
  • Shell 0.2%
  • SCSS 0.1%