Skip to content

Commit

Permalink
#5 turn code coverage controls on (#13)
Browse files Browse the repository at this point in the history
* #5 turn code coverage controls on

* #5 enable coverage reporting service

* try coveralls

* #5 use proper coverage report

* #5 enhance coveralls usage and speed-up build

* #5 update ravis script

* #5 run build with cached plt

* #5 update build status badge

* #5 run travis build insingle command

* #5 little rearrangement for makefile
  • Loading branch information
bearmug committed Jan 30, 2019
1 parent a555559 commit 83145e6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
cache:
directories:
- ./_build/plt

language: erlang

otp_release:
- 21.0

script:
- make code-checks
- make test
- make travis
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
REBAR = ./rebar3

all: clean code-checks test
all: clean code-checks test cover

travis: all coveralls

clean:
$(REBAR) clean

compile:
$(REBAR) compile

test: compile
$(REBAR) do ct -v

code-checks: compile
$(REBAR) dialyzer
$(REBAR) as lint lint

test: compile
$(REBAR) as test do ct -v

cover:
$(REBAR) as test cover --min_coverage=100 -v

coveralls:
$(REBAR) as test coveralls send
2 changes: 1 addition & 1 deletion README-hidden.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/bearmug/oleg-migrations.svg?branch=master)](https://travis-ci.org/bearmug/oleg-migrations)
[![Build Status](https://travis-ci.org/bearmug/erlang-pure-migrations.svg?branch=master)](https://travis-ci.org/bearmug/erlang-pure-migrations) [![Coverage Status](https://coveralls.io/repos/github/bearmug/erlang-pure-migrations/badge.svg?branch=master)](https://coveralls.io/github/bearmug/erlang-pure-migrations?branch=master)

- [Erlang ❤ pure Postgres migrations](#erlang---pure-postgres-migrations)
* [Quick start](#quick-start)
Expand Down
22 changes: 15 additions & 7 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{eunit_opts, [verbose]}.

{cover_enabled, true}.
{cover_print_enabled, true}.

{profiles, [
{test, [
{deps, [
{erlexec, {git, "https://github.com/saleyn/erlexec.git", {ref, "576fb5d"}}}
]}
]},
{eunit_opts , [verbose]},
{cover_enabled , true},
{cover_print_enabled , true},
{cover_export_enabled , true},
{coveralls_coverdata , "_build/test/cover/ct.coverdata"},
{coveralls_service_name , "travis-ci"},
{plugins , [coveralls]}
]},
{lint, [
{plugins, [rebar3_lint]}
Expand All @@ -25,4 +27,10 @@
{elvis_style, state_record_and_type, disable} % epgsql_sock
]}
]
}.
}.


{dialyzer,
[
{plt_location, "_build/plt"}
]}.
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 83145e6

Please sign in to comment.