From 55acd54ca7c5eb52fcf4107636abb3af3defc0b1 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Thu, 13 Dec 2018 12:34:50 -0500 Subject: [PATCH 1/2] Add coveralls --- .travis.yml | 1 + mix.exs | 16 +++++++++++++++- mix.lock | 16 ++++++++++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ec9cfd0..0cf9fe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ language: elixir elixir: "1.7.4" otp_release: "21.2" +script: mix coveralls.travis diff --git a/mix.exs b/mix.exs index a3790f2..7c4c2f3 100644 --- a/mix.exs +++ b/mix.exs @@ -15,6 +15,15 @@ defmodule Base62UUID.Mixfile do source_url: @github_url, docs: docs(), elixir: "~> 1.3", + test_coverage: [tool: ExCoveralls], + preferred_cli_env: [ + coveralls: :test, + "coveralls.detail": :test, + "coveralls.html": :test, + "coveralls.json": :test, + "coveralls.post": :test, + "coveralls.travis": :test + ], deps: deps() ] end @@ -36,7 +45,12 @@ defmodule Base62UUID.Mixfile do # # Type "mix help deps" for more examples and options defp deps do - [{:base62, "~> 1.2.0"}, {:uuid, "~> 1.1.5"}, {:ex_doc, ">= 0.0.0", only: [:dev]}] + [ + {:base62, "~> 1.2.0"}, + {:uuid, "~> 1.1.5"}, + {:ex_doc, ">= 0.0.0", only: [:dev]}, + {:excoveralls, "~> 0.10.3", only: [:test]} + ] end defp package do diff --git a/mix.lock b/mix.lock index 3fbf188..8ac301a 100644 --- a/mix.lock +++ b/mix.lock @@ -1,5 +1,17 @@ -%{"base62": {:hex, :base62, "1.2.0", "eb2b1f49a7deae2c10ff4dd862e8a87ed5ac749e6d4497367517e1894c6aa2ef", [:mix], [{:custom_base, "~> 0.2.0", [hex: :custom_base, optional: false]}]}, +%{ + "base62": {:hex, :base62, "1.2.0", "eb2b1f49a7deae2c10ff4dd862e8a87ed5ac749e6d4497367517e1894c6aa2ef", [:mix], [{:custom_base, "~> 0.2.0", [hex: :custom_base, optional: false]}]}, + "certifi": {:hex, :certifi, "2.4.2", "75424ff0f3baaccfd34b1214184b6ef616d89e420b258bb0a5ea7d7bc628f7f0", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm"}, "custom_base": {:hex, :custom_base, "0.2.0", "fe09e514c090dbb0e2e6ff2599b1a55415e91aabde255e0f105a404dcca7798d", [:mix], []}, "earmark": {:hex, :earmark, "1.0.1", "2c2cd903bfdc3de3f189bd9a8d4569a075b88a8981ded9a0d95672f6e2b63141", [:mix], []}, "ex_doc": {:hex, :ex_doc, "0.13.1", "658dbfc8cc5b0fac192f0f3254efe66ee6294200804a291549e0aeb052053bba", [:mix], [{:earmark, "~> 1.0", [hex: :earmark, optional: false]}]}, - "uuid": {:hex, :uuid, "1.1.5", "96cb36d86ee82f912efea4d50464a5df606bf3f1163d6bdbb302d98474969369", [:mix], []}} + "excoveralls": {:hex, :excoveralls, "0.10.3", "b090a3fbcb3cfa136f0427d038c92a9051f840953ec11b40ee74d9d4eac04d1e", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, + "hackney": {:hex, :hackney, "1.14.3", "b5f6f5dcc4f1fba340762738759209e21914516df6be440d85772542d4a5e412", [:rebar3], [{:certifi, "2.4.2", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "6.0.0", [hex: :idna, repo: "hexpm", optional: false]}, {:metrics, "1.0.1", [hex: :metrics, repo: "hexpm", optional: false]}, {:mimerl, "1.0.2", [hex: :mimerl, repo: "hexpm", optional: false]}, {:ssl_verify_fun, "1.1.4", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, + "idna": {:hex, :idna, "6.0.0", "689c46cbcdf3524c44d5f3dde8001f364cd7608a99556d8fbd8239a5798d4c10", [:rebar3], [{:unicode_util_compat, "0.4.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, + "jason": {:hex, :jason, "1.1.2", "b03dedea67a99223a2eaf9f1264ce37154564de899fd3d8b9a21b1a6fd64afe7", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, + "metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm"}, + "mimerl": {:hex, :mimerl, "1.0.2", "993f9b0e084083405ed8252b99460c4f0563e41729ab42d9074fd5e52439be88", [:rebar3], [], "hexpm"}, + "parse_trans": {:hex, :parse_trans, "3.3.0", "09765507a3c7590a784615cfd421d101aec25098d50b89d7aa1d66646bc571c1", [:rebar3], [], "hexpm"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.4", "f0eafff810d2041e93f915ef59899c923f4568f4585904d010387ed74988e77b", [:make, :mix, :rebar3], [], "hexpm"}, + "unicode_util_compat": {:hex, :unicode_util_compat, "0.4.1", "d869e4c68901dd9531385bb0c8c40444ebf624e60b6962d95952775cac5e90cd", [:rebar3], [], "hexpm"}, + "uuid": {:hex, :uuid, "1.1.5", "96cb36d86ee82f912efea4d50464a5df606bf3f1163d6bdbb302d98474969369", [:mix], []}, +} From 38d922ea6f3823b4c56be4a4a0ee4c13f65a6d87 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Thu, 13 Dec 2018 12:35:42 -0500 Subject: [PATCH 2/2] Add coverage to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 48bd20c..bff8982 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Base62UUID [![Build Status](https://travis-ci.com/jclem/base62_uuid.svg?branch=master)](https://travis-ci.com/jclem/base62_uuid) +# Base62UUID [![Build Status](https://travis-ci.com/jclem/base62_uuid.svg?branch=master)](https://travis-ci.com/jclem/base62_uuid) [![Coverage Status](https://coveralls.io/repos/github/jclem/base62_uuid/badge.svg?branch=master)](https://coveralls.io/github/jclem/base62_uuid?branch=master) A library for generating 22-byte-length, Base62-encoded v4 UUIDs.