diff --git a/.gitignore b/.gitignore index 45ce6ce..c378754 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /docs /doc mix.lock +cover/ diff --git a/.travis.yml b/.travis.yml index 55966a6..2629f6f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,9 @@ notifications: - self@falood.me before_script: - mix deps.get --only test +script: + - mix test + - MIX_ENV=test mix coveralls.travis after_script: - MIX_ENV=docs mix deps.get - MIX_ENV=docs mix inch.report diff --git a/README.md b/README.md index 9123c8f..12b8423 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ [![Deps Status](https://beta.hexfaktor.org/badge/all/github/elixir-maru/maru.svg?branch=master&style=flat-square)](https://beta.hexfaktor.org/github/elixir-maru/maru) [![Docs](https://inch-ci.org/github/elixir-maru/maru.svg?branch=master&style=flat-square)](https://inch-ci.org/github/elixir-maru/maru) [![Hex.pm Downloads](https://img.shields.io/hexpm/dt/maru.svg?style=flat-square)](https://hex.pm/packages/maru) +[![Coverage Status](https://coveralls.io/repos/github/elixir-maru/maru/badge.svg?branch=master)](https://coveralls.io/github/elixir-maru/maru?branch=master) ## Usage diff --git a/mix.exs b/mix.exs index e23ea70..5c75fd7 100644 --- a/mix.exs +++ b/mix.exs @@ -16,7 +16,9 @@ defmodule Maru.Mixfile do docs: [ extras: ["README.md"], main: "readme", - ] + ], + test_coverage: [tool: ExCoveralls], + preferred_cli_env: ["coveralls": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test], ] end @@ -33,6 +35,7 @@ defmodule Maru.Mixfile do { :inch_ex, "~> 0.5", only: :docs }, { :earmark, "~> 1.2", only: :docs }, { :ex_doc, "~> 0.16", only: :docs }, + { :excoveralls, "~> 0.7.4", only: [:dev, :test] }, ] end