Skip to content

Commit

Permalink
Added coverage support
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Schimpf committed Feb 15, 2020
1 parent f845435 commit 394f128
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ install:
- ./rebar3 update
script:
- make test
- make coverage
- ./rebar3 as test coveralls send
- make xref
- make dialyzer
sudo: required
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ pulse:
test: compile
${REBAR} eunit

coverage: compile
${REBAR} cover --verbose

docs:
${REBAR} doc

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Build upon the essence of Riak KV's core with an up-to-date, modular and extensi
![Language](https://img.shields.io/badge/language-erlang-blue.svg)
![Release](https://img.shields.io/badge/release-R21+-9cf.svg)
![Build](https://img.shields.io/badge/build-rebar3%203.13.0-brightgreen.svg)
[![Hex pm](https://img.shields.io/hexpm/v/riak_core_lite.svg?style=flat)](https://hex.pm/packages/riak_core_lite)

[![Hex pm](https://img.shields.io/hexpm/v/riak_core_lite.svg)](https://hex.pm/packages/riak_core_lite)
[![Build Status](https://api.travis-ci.org/riak-core-lite/riak_core_lite.svg?branch=master)](https://api.travis-ci.org/riak-core-lite/riak_core_lite.svg?branch=master)
[![Coverage Status](https://coveralls.io/repos/github/riak-core-lite/riak_core_lite/badge.svg?branch=master)](https://coveralls.io/github/riak-core-lite/riak_core_lite?branch=master)


To get started with riak_core_lite you can follow Mariano Guerra's tutorials.
Expand Down
6 changes: 6 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{profiles, [
{test, [
{erl_opts, [nowarn_export_all]},
{plugins, [{coveralls, {git, "https://github.com/markusn/coveralls-erl", {branch, "master"}}}]},
{deps,
[
{mustache, ".*", {git, "https://github.com/mojombo/mustache.erl.git", {tag, "v0.1.1"}}},
Expand All @@ -31,3 +32,8 @@
]}
]}
]}.

{cover_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "travis-ci"}.
6 changes: 6 additions & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
case os:getenv("TRAVIS") of
"true" ->
lists:keystore(coveralls_service_job_id, 1, CONFIG, {coveralls_service_job_id, os:getenv("TRAVIS_JOB_ID")});
_ ->
CONFIG
end.

0 comments on commit 394f128

Please sign in to comment.