Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code coverage #62

Merged
merged 2 commits into from
Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ erl_crash.dump
/config/*.secret.exs

.hex
.mix/archives

.env*
config/*.env

cover
Binary file modified .hex/cache.ets
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{application,hex,
[{description,"hex"},
[{applications,[kernel,stdlib,elixir,ssl,inets]},
{description,"hex"},
{modules,['Elixir.Hex','Elixir.Hex.API','Elixir.Hex.API.Auth',
'Elixir.Hex.API.Key',
'Elixir.Hex.API.Key.Organization',
Expand All @@ -18,15 +19,16 @@
'Elixir.Hex.Crypto.PublicKey','Elixir.Hex.HTTP',
'Elixir.Hex.HTTP.Certs','Elixir.Hex.HTTP.SSL',
'Elixir.Hex.HTTP.VerifyHostname','Elixir.Hex.Mix',
'Elixir.Hex.Mix.TaskDescription',
'Elixir.Hex.OptionParser','Elixir.Hex.Parallel',
'Elixir.Hex.Registry','Elixir.Hex.Registry.Server',
'Elixir.Hex.RemoteConverger','Elixir.Hex.Repo',
'Elixir.Hex.Resolver',
'Elixir.Hex.Resolver.Backtracks','Elixir.Hex.SCM',
'Elixir.Hex.Server','Elixir.Hex.Set',
'Elixir.Hex.Shell','Elixir.Hex.State',
'Elixir.Hex.UpdateChecker','Elixir.Hex.Utils',
'Elixir.Hex.Version',
'Elixir.Hex.Shell','Elixir.Hex.Shell.Process',
'Elixir.Hex.State','Elixir.Hex.UpdateChecker',
'Elixir.Hex.Utils','Elixir.Hex.Version',
'Elixir.Hex.Version.InvalidRequirementError',
'Elixir.Hex.Version.InvalidVersionError',
'Elixir.Hex.Version.Requirement',
Expand All @@ -39,6 +41,7 @@
'Elixir.Mix.Tasks.Hex.Organization',
'Elixir.Mix.Tasks.Hex.Outdated',
'Elixir.Mix.Tasks.Hex.Owner',
'Elixir.Mix.Tasks.Hex.Package',
'Elixir.Mix.Tasks.Hex.Publish',
'Elixir.Mix.Tasks.Hex.Repo',
'Elixir.Mix.Tasks.Hex.Retire',
Expand All @@ -47,6 +50,5 @@
mix_hex_filename,mix_hex_pb_package,mix_hex_pb_signed,
mix_hex_registry,mix_hex_tarball,mix_safe_erl_term]},
{registered,[]},
{vsn,"0.18.1"},
{applications,[kernel,stdlib,elixir,ssl,inets]},
{vsn,"0.20.5"},
{mod,{'Elixir.Hex',[]}}]}.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: assets bash build deps help iex logs migrate ps restart seed setup_db stop test up publish db_dump release
.PHONY: assets bash build coverage deps help iex logs migrate ps restart seed setup_db stop test up publish db_dump release

SERVICE ?= api

Expand All @@ -22,8 +22,12 @@ build: #: Build containers
touch config/docker.env
docker-compose build

coverage: #: Generate HTML coverage report
docker-compose run --rm -e MIX_ENV=test $(SERVICE) mix coveralls.html
open cover/excoveralls.html

deps: #: Install the dependencies
docker-compose run --rm $(SERVICE) mix deps.get
docker-compose run --rm -e MIX_ENV=test $(SERVICE) mix deps.get

format: #: Run mix format
docker-compose run --rm $(SERVICE) mix format
Expand Down
6 changes: 6 additions & 0 deletions coveralls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"skip_files": [
"lib/alex_koin_web",
"test/support"
]
}
2 changes: 0 additions & 2 deletions lib/alex_koin/slack.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ defmodule AlexKoin.SlackRtm do
def handle_event(_, _, state), do: {:ok, state}

def handle_info({:message, text, channel}, slack, state) do
IO.puts("Sending your message, captain!")

@slack_module.send_message(text, channel, slack)

{:ok, state}
Expand Down
7 changes: 5 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ defmodule AlexKoin.Mixfile do
[
app: :alex_koin,
version: "2.0.0",
elixir: "~> 1.7",
elixir: "~> 1.9",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test]
]
end

Expand Down Expand Up @@ -45,6 +47,7 @@ defmodule AlexKoin.Mixfile do
{:elixir_uuid, "~> 1.2"},
{:timex, "~> 3.5"},
{:distillery, "~> 2.1.1"},
{:excoveralls, "~> 0.10", only: :test},
{:ex_machina, "~> 2.3", only: :test},
{:faker, "~> 0.13", only: :test}
]
Expand Down
79 changes: 40 additions & 39 deletions mix.lock

Large diffs are not rendered by default.