Skip to content

Commit

Permalink
Add coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
lpgauth committed Feb 5, 2016
1 parent 5ffd62f commit b4316f8
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
cache:
directories:
- $HOME/.cache/rebar3
install: true
language: erlang
notifications:
email: false
otp_release:
- 18.2.1
- 17.5
script: "make test"
script: "make travis"
sudo: false
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ compile:
@echo "Running rebar3 compile..."
@$(REBAR) as compile compile

coveralls:
@echo "Running rebar3 coveralls send..."
@$(REBAR) as test coveralls send

dialyzer:
@echo "Running rebar3 dialyze..."
@$(REBAR) dialyzer
Expand Down Expand Up @@ -42,10 +46,12 @@ shell:
@echo "Running rebar3 shell..."
@$(REBAR) as test shell

test: dialyzer elvis eunit xref
test: elvis xref eunit dialyzer

travis: elvis xref eunit coveralls dialyzer

xref:
@echo "Running rebar3 xref..."
@$(REBAR) xref

.PHONY: edoc test xref
.PHONY: clean compile coveralls dialyzer edoc elvis profile xref
Binary file modified bin/rebar3
Binary file not shown.
10 changes: 10 additions & 0 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{cover_enabled, true}.
{cover_export_enabled, true}.
{coveralls_coverdata, "_build/test/cover/eunit.coverdata"}.
{coveralls_service_name, "travis-ci"}.

{edoc_opts, [
{app_default, "http://www.erlang.org/doc/man"},
{doclet, edown_doclet},
Expand All @@ -13,6 +18,11 @@
{platform_define, "18", 'ETS_TAKE'}
]}.

{plugins, [
{coveralls,
{git, "https://github.com/markusn/coveralls-erl", {branch, "master"}}}
]}.

{profiles, [
{compile, [
{erl_opts, [
Expand Down
7 changes: 7 additions & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
case os:getenv("TRAVIS") of
"true" ->
JobId = os:getenv("TRAVIS_JOB_ID"),
lists:keystore(coveralls_service_job_id, 1, CONFIG, {coveralls_service_job_id, JobId});
_ ->
CONFIG
end.

0 comments on commit b4316f8

Please sign in to comment.