add cover test info
diff --git a/.gitignore b/.gitignore
index 8664ad3..66956dd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@
target
*.iml
*.crashdump
+codecov.json
diff --git a/.travis.yml b/.travis.yml
index 90d658c..d78cc24 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,13 @@
language: erlang
+sudo: true
+install:
+ - sudo pip install codecov
otp_release:
- 21.0.4
-sudo: false
-
script:
- rebar3 compile
+ - rebar3 eunit -c
+ - rebar3 codecov analyze
+
+after_success:
+ - codecov
\ No newline at end of file
diff --git a/rebar.config b/rebar.config
index 928541f..7bcaa9a 100644
--- a/rebar.config
+++ b/rebar.config
@@ -5,9 +5,19 @@
{root_dir, "."}.
{project_app_dirs, ["."]}.
{extra_src_dirs, ["test"]}.
-{ct_opts, []}.
+{plugins, [
+ rebar3_hex,
+ {rebar3_codecov, "0.1.0"}
+]}.
-{plugins, [rebar3_hex]}.
+{provider_hooks,
+ [
+ {post, [{ct, {codecov, analyze}}]},
+ {post, [{eunit, {codecov, analyze}}]}
+ ]}.
+
+{cover_enabled, true}.
+{cover_export_enabled,true}.
{deps, [
{erlzk, ".*", {git, "https://github.com/huaban/erlzk.git", {tag, "v0.6.2"}}},