Skip to content

Commit

Permalink
Add excoveralls
Browse files Browse the repository at this point in the history
Resolves #88
  • Loading branch information
KronicDeth committed Apr 4, 2018
1 parent f71e542 commit bed3f0a
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ jobs:
name: Wait for Redis
command: dockerize -wait tcp://localhost:6379 -timeout 1m

- run: mix test
- run: mix coveralls.circle --umbrella

- store_test_results:
path: _build/test/junit
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# App artifacts
/_build
/cover
/db
/deps
/*.ez
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Configure your local CCMenu with the following url: [`https://circleci.com/gh/po

* Build the assets: `$ cd apps/explorer_web/assets && yarn build && cd -`
* Format the Elixir code: `$ mix format`
* Run the test suite: `$ mix test`
* Run the test suite with coverage for whole umbrella project: `$ mix coveralls.html --umbrella`
* Lint the Elixir code: `$ mix credo --strict`
* Run the dialyzer: `mix dialyzer --halt-exit-status`
* Check the Elixir code for vulnerabilities: `$ mix sobelow --config`
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To get POA Explorer up and running locally:
### Testing

* Format the Elixir code: `$ mix format`
* Run the test suite: `$ mix test`
* Run the test suite with coverage: `$ mix coveralls.html`
* Lint the Elixir code: `$ mix credo --strict`
* Run the dialyzer: `mix dialyzer --halt-exit-status`
* Check the Elixir code for vulnerabilities: `$ mix sobelow --config`
9 changes: 9 additions & 0 deletions apps/explorer/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ defmodule Explorer.Mixfile do
elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock",
package: package(),
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
version: "0.0.1"
]
end
Expand Down Expand Up @@ -68,6 +75,8 @@ defmodule Explorer.Mixfile do
{:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false},
{:ethereumex, "~> 0.3"},
{:ex_machina, "~> 2.1", only: [:test]},
# Code coverage
{:excoveralls, "~> 0.8.1", only: [:test]},
{:exq, "~> 0.9.1"},
{:exq_ui, "~> 0.9.0"},
{:exvcr, "~> 0.10", only: :test},
Expand Down
2 changes: 1 addition & 1 deletion apps/explorer_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can also run IEx (Interactive Elixir): `$ iex -S mix phx.server` (This can b

* Build the assets: `$ cd assets && yarn build`
* Format the Elixir code: `$ mix format`
* Run the test suite: `$ mix test`
* Run the test suite with coverage: `$ mix coveralls.html`
* Lint the Elixir code: `$ mix credo --strict`
* Run the dialyzer: `mix dialyzer --halt-exit-status`
* Check the Elixir code for vulnerabilities: `$ mix sobelow --config`
Expand Down
9 changes: 9 additions & 0 deletions apps/explorer_web/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ defmodule ExplorerWeb.Mixfile do
elixirc_paths: elixirc_paths(Mix.env()),
lockfile: "../../mix.lock",
package: package(),
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
version: "0.0.1"
]
end
Expand Down Expand Up @@ -72,6 +79,8 @@ defmodule ExplorerWeb.Mixfile do
{:ex_cldr_units, "~> 1.0"},
{:ex_jasmine, github: "minifast/ex_jasmine", branch: "master"},
{:ex_machina, "~> 2.1", only: [:test]},
# Code coverage
{:excoveralls, "~> 0.8.1", only: [:test]},
{:explorer, in_umbrella: true},
{:exvcr, "~> 0.10", only: :test},
{:flow, "~> 0.12"},
Expand Down
9 changes: 9 additions & 0 deletions coveralls.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"coverage_options": {
"treat_no_relevant_lines_as_covered": true,
"minimum_coverage": 77.8
},
"terminal_options": {
"file_column_width": 120
}
}
14 changes: 12 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ defmodule ExplorerUmbrella.Mixfile do
plt_add_apps: [:mix],
ignore_warnings: ".dialyzer-ignore"
],
start_permanent: Mix.env() == :prod
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls]
]
end

Expand All @@ -27,6 +34,9 @@ defmodule ExplorerUmbrella.Mixfile do
# Dependencies listed here are available only for this project
# and cannot be accessed from applications inside the apps folder
defp deps do
[]
[
# Code coverage
{:excoveralls, "~> 0.8.1", only: [:test]}
]
end
end
1 change: 1 addition & 0 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ex_jasmine": {:git, "https://github.com/minifast/ex_jasmine.git", "f2c906e36b469a9bf0891c23cd72135ba6a257f1", [branch: "master"]},
"ex_machina": {:hex, :ex_machina, "2.1.0", "4874dc9c78e7cf2d429f24dc3c4005674d4e4da6a08be961ffccc08fb528e28b", [:mix], [{:ecto, "~> 2.1", [hex: :ecto, repo: "hexpm", optional: true]}], "hexpm"},
"exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], [], "hexpm"},
"excoveralls": {:hex, :excoveralls, "0.8.1", "0bbf67f22c7dbf7503981d21a5eef5db8bbc3cb86e70d3798e8c802c74fa5e27", [:mix], [{:exjsx, ">= 3.0.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:hackney, ">= 0.12.0", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm"},
"exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm"},
"exq": {:hex, :exq, "0.9.1", "77ee12c117411ddddd9810aec714eaa704fb8f327949551d9efaea19606122c3", [:mix], [{:poison, ">= 1.2.0 or ~> 2.0", [hex: :poison, repo: "hexpm", optional: false]}, {:redix, ">= 0.5.0", [hex: :redix, repo: "hexpm", optional: false]}, {:uuid, ">= 1.1.0", [hex: :uuid, repo: "hexpm", optional: false]}], "hexpm"},
"exq_ui": {:hex, :exq_ui, "0.9.0", "e97e9fa9009f30d2926b51a166e40a3a521e83f61f3f333fede8335b2aa57f09", [:mix], [{:cowboy, "~> 1.0", [hex: :cowboy, repo: "hexpm", optional: false]}, {:exq, "~> 0.9", [hex: :exq, repo: "hexpm", optional: false]}, {:plug, ">= 0.8.1 and < 2.0.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"},
Expand Down

0 comments on commit bed3f0a

Please sign in to comment.