Add excoveralls

Resolves #88
pull/89/head
Luke Imhoff 7 years ago
parent 8466e445a1
commit 736fa26b35
  1. 2
      .circleci/config.yml
  2. 1
      .gitignore
  3. 4
      README.md
  4. 2
      apps/explorer/README.md
  5. 9
      apps/explorer/mix.exs
  6. 2
      apps/explorer_web/README.md
  7. 9
      apps/explorer_web/mix.exs
  8. 9
      coveralls.json
  9. 14
      mix.exs
  10. 1
      mix.lock

@ -334,7 +334,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

1
.gitignore vendored

@ -1,5 +1,6 @@
# App artifacts
/_build
/cover
/db
/deps
/*.ez

@ -1,4 +1,4 @@
# POA Explorer [![CircleCI](https://circleci.com/gh/poanetwork/poa-explorer.svg?style=svg&circle-token=f8823a3d0090407c11f87028c73015a331dbf604)](https://circleci.com/gh/poanetwork/poa-explorer)
# POA Explorer [![CircleCI](https://circleci.com/gh/poanetwork/poa-explorer.svg?style=svg&circle-token=f8823a3d0090407c11f87028c73015a331dbf604)](https://circleci.com/gh/poanetwork/poa-explorer) [![Coverage Status](https://coveralls.io/repos/github/poanetwork/poa-explorer/badge.svg?branch=master)](https://coveralls.io/github/poanetwork/poa-explorer?branch=master)
This is a tool for inspecting and analyzing the POA Network blockchain.
@ -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`

@ -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`

@ -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
@ -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},

@ -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`

@ -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
@ -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"},

@ -0,0 +1,9 @@
{
"coverage_options": {
"treat_no_relevant_lines_as_covered": true,
"minimum_coverage": 77.8
},
"terminal_options": {
"file_column_width": 120
}
}

@ -11,7 +11,14 @@ defmodule ExplorerUmbrella.Mixfile do
ignore_warnings: ".dialyzer-ignore"
],
elixir: "~> 1.6",
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
@ -28,6 +35,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

@ -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"},

Loading…
Cancel
Save