Skip to content

Commit 0584037

Browse files
sobolevnSam Seay
authored andcommitted
Added coveralls support. (#11)
Changes: 1. Added `deps` 2. Refactored `.travis.yml` with multiple elixir versions and pushing stats to coveralls.io 3. Added coverage badge to `README.md` 4. Added ignore pattern for `cover/` folder
1 parent 8b77a3c commit 0584037

5 files changed

Lines changed: 32 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
erl_crash.dump
33
/deps
44
/doc
5+
/cover

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
language: elixir
2+
sudo: false
3+
24
elixir:
5+
- 1.2.6
36
- 1.3.2
47

5-
script: mix test && mix credo --strict
8+
env: MIX_ENV=test
9+
10+
script:
11+
- mix coveralls.html && mix credo --strict
12+
- mix coveralls.travis

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Recaptcha
22

3-
![Build Status](https://travis-ci.org/samueljseay/recaptcha.svg?branch=master)
3+
![Build Status](https://travis-ci.org/samueljseay/recaptcha.svg?branch=master) ![Coverage Status](https://coveralls.io/repos/github/samueljseay/recaptcha/badge.svg?branch=master)
44

55
A simple Elixir package for implementing [reCAPTCHA] in Elixir applications.
66

mix.exs

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@ defmodule Recaptcha.Mixfile do
22
use Mix.Project
33

44
def project do
5-
[app: :recaptcha,
6-
version: "2.0.1",
7-
elixir: "~> 1.2",
8-
description: description,
9-
deps: deps,
10-
package: package]
5+
[
6+
app: :recaptcha,
7+
version: "2.0.1",
8+
elixir: "~> 1.2",
9+
description: description(),
10+
deps: deps(),
11+
package: package(),
12+
13+
# Test coverage:
14+
test_coverage: [tool: ExCoveralls],
15+
preferred_cli_env: [
16+
"coveralls": :test,
17+
"coveralls.detail": :test,
18+
"coveralls.post": :test,
19+
"coveralls.html": :test,
20+
],
21+
]
1122
end
1223

1324
def application do
@@ -26,7 +37,8 @@ defmodule Recaptcha.Mixfile do
2637
{:httpoison, "~> 0.9.0"},
2738
{:poison, "~> 1.5 or ~> 2.0"},
2839
{:credo, "~> 0.4", only: [:dev, :test]},
29-
{:ex_doc, ">= 0.0.0", only: :dev}
40+
{:ex_doc, ">= 0.0.0", only: :dev},
41+
{:excoveralls, "~> 0.5", only: :test},
3042
]
3143
end
3244

mix.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
"credo": {:hex, :credo, "0.4.11", "03a64e9d53309b7132556284dda0be57ba1013885725124cfea7748d740c6170", [:mix], [{:bunt, "~> 0.1.6", [hex: :bunt, optional: false]}]},
44
"earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], []},
55
"ex_doc": {:hex, :ex_doc, "0.13.0", "aa2f8fe4c6136a2f7cfc0a7e06805f82530e91df00e2bff4b4362002b43ada65", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]},
6+
"excoveralls": {:hex, :excoveralls, "0.5.6", "35a903f6f78619ee7f951448dddfbef094b3a0d8581657afaf66465bc930468e", [:mix], [{:exjsx, "~> 3.0", [hex: :exjsx, optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, optional: false]}]},
7+
"exjsx": {:hex, :exjsx, "3.2.0", "7136cc739ace295fc74c378f33699e5145bead4fdc1b4799822d0287489136fb", [:mix], [{:jsx, "~> 2.6.2", [hex: :jsx, optional: false]}]},
68
"hackney": {:hex, :hackney, "1.6.1", "ddd22d42db2b50e6a155439c8811b8f6df61a4395de10509714ad2751c6da817", [:rebar3], [{:certifi, "0.4.0", [hex: :certifi, optional: false]}, {:idna, "1.2.0", [hex: :idna, optional: false]}, {:metrics, "1.0.1", [hex: :metrics, optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, optional: false]}, {:ssl_verify_fun, "1.1.0", [hex: :ssl_verify_fun, optional: false]}]},
79
"httpoison": {:hex, :httpoison, "0.9.1", "6c2b4eaf2588a6f3ef29663d28c992531ca3f0bc832a97e0359bc822978e1c5d", [:mix], [{:hackney, "~> 1.6.0", [hex: :hackney, optional: false]}]},
810
"httpotion": {:hex, :httpotion, "2.1.0"},
911
"ibrowse": {:git, "https://github.com/cmullaparthi/ibrowse.git", "ea3305d21f37eced4fac290f64b068e56df7de80", [tag: "v4.1.2"]},
1012
"idna": {:hex, :idna, "1.2.0", "ac62ee99da068f43c50dc69acf700e03a62a348360126260e87f2b54eced86b2", [:rebar3], []},
13+
"jsx": {:hex, :jsx, "2.6.2", "213721e058da0587a4bce3cc8a00ff6684ced229c8f9223245c6ff2c88fbaa5a", [:mix, :rebar], []},
1114
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], []},
1215
"mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], []},
1316
"poison": {:hex, :poison, "2.2.0", "4763b69a8a77bd77d26f477d196428b741261a761257ff1cf92753a0d4d24a63", [:mix], []},

0 commit comments

Comments
 (0)