Skip to content

Commit

Permalink
Added Coveralls code-coverage statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenhart committed Jun 7, 2018
1 parent 4dbed8a commit ab42a9d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ matrix:
- elixir: 1.6.5
otp_release: 19.3
env:
- MIX_ENV=test COVERALLS_ELIXIR_VERSION=1.6.5 COVERALLS_OTP_RELEASE=20.5
- MIX_ENV=test COVERALLS_ELIXIR_VERSION=1.5.2 COVERALLS_OTP_RELEASE=19.3
script:
- mix test --no-start
after_script:
- ./coveralls.sh
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Build Status](https://travis-ci.org/pmenhart/no_slides.svg??branch=riak_core_3)](https://travis-ci.org/pmenhart/no_slides)
[![Coverage Status](https://coveralls.io/repos/github/pmenhart/no_slides/badge.svg?branch=riak_core_3)](https://coveralls.io/github/pmenhart/no_slides?branch=riak_core_3)


# NoSlides example application

Example application for the talk at [NoSlidesConf][0]. This application is a sample application with some functionalities available on riak_core.
Expand All @@ -23,7 +27,7 @@ mix deps.get
mix compile
```

Run the unit test that executes the riak_core ring onseveral slave nodes in a cluster. Nodes are configured in `config/test.exs`. To prevent running RiakCore on the master node (which is harmless, but clutters the logs), invoke with:
Run the unit test that executes the riak_core ring on several slave nodes in a cluster. Nodes are configured in `config/test.exs`. To prevent running RiakCore on the master node (which is harmless, but clutters the logs), invoke with:
```shell
mix test --no-start
```
Expand Down
5 changes: 5 additions & 0 deletions coveralls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"skip_files": [
"test/support"
]
}
12 changes: 12 additions & 0 deletions coveralls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -x

echo "Elixir: $TRAVIS_ELIXIR_VERSION Erlang: $TRAVIS_OTP_RELEASE"

if [ "$COVERALLS_ELIXIR_VERSION" == "$TRAVIS_ELIXIR_VERSION" ] && [ "$COVERALLS_OTP_RELEASE" == "$TRAVIS_OTP_RELEASE" ]; then
echo "Posting coveralls"
mix deps.get --only docs
mix coveralls.travis
MIX_ENV=docs mix inch.report
fi
2 changes: 1 addition & 1 deletion test/support/riak_cluster.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ defmodule NoSlides.RiakCluster do
data_dir = './data/#{node_host}' # single quotes for compatibility with Erlang

add_code_paths(node)
rpc(node, Application, :load, [:lager])
#rpc(node, Application, :load, [:lager])
rpc(node, Application, :load, [:riak_core])
rpc(node, Application, :put_env, [:riak_core, :ring_state_dir, data_dir])
rpc(node, Application, :put_env, [:riak_core, :platform_data_dir, data_dir])
Expand Down

0 comments on commit ab42a9d

Please sign in to comment.