diff --git a/.circleci/config.yml b/.circleci/config.yml index ae63e86538..fb9f7e4a99 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -337,7 +337,9 @@ jobs: if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then mix coveralls.html --exclude no_geth --parallel --umbrella else - mix coveralls.circle --exclude no_geth --parallel --umbrella + mix coveralls.circle --exclude no_geth --parallel --umbrella || + # if mix failed, then coveralls_merge won't run, so single done here + curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" fi - store_artifacts: @@ -385,7 +387,9 @@ jobs: if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then mix coveralls.html --exclude no_geth --parallel --umbrella else - mix coveralls.circle --exclude no_geth --parallel --umbrella + mix coveralls.circle --exclude no_geth --parallel --umbrella || + # if mix failed, then coveralls_merge won't run, so signal done here + curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" fi - store_artifacts: @@ -433,7 +437,9 @@ jobs: if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then mix coveralls.html --exclude no_parity --parallel --umbrella else - mix coveralls.circle --exclude no_parity --parallel --umbrella + mix coveralls.circle --exclude no_parity --parallel --umbrella || + # if mix failed, then coveralls_merge won't run, so signal done here + curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" fi - store_artifacts: @@ -481,13 +487,26 @@ jobs: if [[ -z "$COVERALLS_REPO_TOKEN" ]]; then mix coveralls.html --exclude no_parity --parallel --umbrella else - mix coveralls.circle --exclude no_parity --parallel --umbrella + mix coveralls.circle --exclude no_parity --parallel --umbrella || + # if mix failed, then coveralls_merge won't run, so single done here + curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" fi - store_artifacts: path: cover/excoveralls.html - store_test_results: path: _build/test/junit + coveralls_merge: + docker: + # Ensure .tool-versions matches + - image: circleci/elixir:1.7.2 + environment: + MIX_ENV: test + + steps: + - run: + name: Tell coveralls.io build is done + command: curl -k https://coveralls.io/webhook?repo_token=$COVERALLS_REPO_TOKEN -d "payload[build_num]=$CIRCLE_WORKFLOW_WORKSPACE_ID&payload[status]=done" workflows: version: 2 primary: @@ -496,6 +515,13 @@ workflows: - check_formatted: requires: - build + # This unfortunately will only fire if all the tests pass because of how `requires` works + - coveralls_merge: + requires: + - test_parity_http_websocket + - test_parity_mox + - test_geth_http_websocket + - test_geth_mox - credo: requires: - build diff --git a/apps/block_scout_web/mix.exs b/apps/block_scout_web/mix.exs index 48d4fd7148..14d14cbbb8 100644 --- a/apps/block_scout_web/mix.exs +++ b/apps/block_scout_web/mix.exs @@ -70,7 +70,7 @@ defmodule BlockScoutWeb.Mixfile do {:ex_cldr_units, "~> 1.0"}, {:ex_machina, "~> 2.1", only: [:test]}, # Code coverage - {:excoveralls, "~> 0.8.1", only: [:test]}, + {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"}, {:explorer, in_umbrella: true}, {:exvcr, "~> 0.10", only: :test}, # HTML CSS selectors for Phoenix controller tests diff --git a/apps/ethereum_jsonrpc/mix.exs b/apps/ethereum_jsonrpc/mix.exs index 4570869316..07dbb1c770 100644 --- a/apps/ethereum_jsonrpc/mix.exs +++ b/apps/ethereum_jsonrpc/mix.exs @@ -64,7 +64,7 @@ defmodule EthereumJsonrpc.MixProject do # Static Type Checking {:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false}, # Code coverage - {:excoveralls, "~> 0.8.1", only: [:test]}, + {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"}, # JSONRPC HTTP Post calls {:httpoison, "~> 1.0", override: true}, # Decode/Encode JSON for JSONRPC diff --git a/apps/explorer/mix.exs b/apps/explorer/mix.exs index 8507e4c15c..07abbae65d 100644 --- a/apps/explorer/mix.exs +++ b/apps/explorer/mix.exs @@ -76,7 +76,7 @@ defmodule Explorer.Mixfile do # Data factory for testing {:ex_machina, "~> 2.1", only: [:test]}, # Code coverage - {:excoveralls, "~> 0.8.1", only: [:test]}, + {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"}, {:exvcr, "~> 0.10", only: :test}, {:httpoison, "~> 1.0", override: true}, {:jason, "~> 1.0"}, diff --git a/apps/indexer/mix.exs b/apps/indexer/mix.exs index c7064570e4..db91b38796 100644 --- a/apps/indexer/mix.exs +++ b/apps/indexer/mix.exs @@ -38,6 +38,8 @@ defmodule Indexer.MixProject do [ # JSONRPC access to Parity for `Explorer.Indexer` {:ethereum_jsonrpc, in_umbrella: true}, + # Code coverage + {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"}, # Importing to database {:explorer, in_umbrella: true}, # Log errors and application output to separate files diff --git a/mix.exs b/mix.exs index b376540ca9..509e24414a 100644 --- a/mix.exs +++ b/mix.exs @@ -63,7 +63,7 @@ defmodule BlockScout.Mixfile do # Documentation {:ex_doc, "~> 0.18.3", only: [:dev]}, # Code coverage - {:excoveralls, "~> 0.8.1", only: [:test]} + {:excoveralls, "~> 0.10.0", only: [:test], github: "KronicDeth/excoveralls", branch: "circle-workflows"} ] end end diff --git a/mix.lock b/mix.lock index e1e8602afa..d5b543b148 100644 --- a/mix.lock +++ b/mix.lock @@ -30,7 +30,7 @@ "ex_doc": {:hex, :ex_doc, "0.18.3", "f4b0e4a2ec6f333dccf761838a4b253d75e11f714b85ae271c9ae361367897b7", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]}, "ex_machina": {:hex, :ex_machina, "2.1.0", "4874dc9c78e7cf2d429f24dc3c4005674d4e4da6a08be961ffccc08fb528e28b", [:mix], [{:ecto, "~> 2.1", [hex: :ecto, optional: true]}]}, "exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], []}, - "excoveralls": {:hex, :excoveralls, "0.8.1", "0bbf67f22c7dbf7503981d21a5eef5db8bbc3cb86e70d3798e8c802c74fa5e27", [:mix], [{:exjsx, ">= 3.0.0", [repo: "hexpm", hex: :exjsx, optional: false]}, {:hackney, ">= 0.12.0", [repo: "hexpm", hex: :hackney, optional: false]}], "hexpm"}, + "excoveralls": {:git, "https://github.com/KronicDeth/excoveralls.git", "0a859b68851eeba9b43eba59fbc8f9098299cfe1", [branch: "circle-workflows"]}, "exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, optional: false]}]}, "exth_crypto": {:hex, :exth_crypto, "0.1.4", "11f9084dfd70d4f9e96f2710a472f4e6b23044b97530c719550c2b0450ffeb61", [:mix], [{:binary, "~> 0.0.4", [hex: :binary, optional: false]}, {:keccakf1600, "~> 2.0.0", [hex: :keccakf1600_orig, optional: false]}, {:libsecp256k1, "~> 0.1.3", [hex: :libsecp256k1, optional: false]}]}, "exvcr": {:hex, :exvcr, "0.10.0", "5150808404d9f48dbda636f70f7f8fefd93e2433cd39f695f810e73b3a9d1736", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, optional: false]}, {:httpoison, "~> 0.13", [hex: :httpoison, optional: true]}, {:httpotion, "~> 3.0", [hex: :httpotion, optional: true]}, {:ibrowse, "~> 4.4", [hex: :ibrowse, optional: true]}, {:meck, "~> 0.8.8", [hex: :meck, optional: false]}]}, @@ -39,10 +39,10 @@ "flow": {:hex, :flow, "0.12.0", "32c5a5f3ff6693e004b6c17a8c64dce2f8cdaf9564912d79427176013a586ab6", [:mix], [{:gen_stage, "~> 0.12.0", [hex: :gen_stage, optional: false]}]}, "gen_stage": {:hex, :gen_stage, "0.12.2", "e0e347cbb1ceb5f4e68a526aec4d64b54ad721f0a8b30aa9d28e0ad749419cbb", [:mix], []}, "gettext": {:hex, :gettext, "0.14.1", "a666b6782fdb6ccb4736170ccb0928c0f773aa0e47c694d4b7d0338f724ff189", [:mix], []}, - "hackney": {:hex, :hackney, "1.12.1", "8bf2d0e11e722e533903fe126e14d6e7e94d9b7983ced595b75f532e04b7fdc7", [:rebar3], [{:certifi, "2.3.1", [repo: "hexpm", hex: :certifi, optional: false]}, {:idna, "5.1.1", [repo: "hexpm", hex: :idna, optional: false]}, {:metrics, "1.0.1", [repo: "hexpm", hex: :metrics, optional: false]}, {:mimerl, "1.0.2", [repo: "hexpm", hex: :mimerl, optional: false]}, {:ssl_verify_fun, "1.1.1", [repo: "hexpm", hex: :ssl_verify_fun, optional: false]}], "hexpm"}, + "hackney": {:hex, :hackney, "1.13.0", "24edc8cd2b28e1c652593833862435c80661834f6c9344e84b6a2255e7aeef03", [:rebar3], [{:certifi, "2.3.1", [hex: :certifi, repo: "hexpm", optional: false]}, {:idna, "5.1.2", [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.1", [hex: :ssl_verify_fun, repo: "hexpm", optional: false]}], "hexpm"}, "html_entities": {:hex, :html_entities, "0.4.0", "f2fee876858cf6aaa9db608820a3209e45a087c5177332799592142b50e89a6b", [:mix], []}, "httpoison": {:hex, :httpoison, "1.1.0", "497949fb62924432f64a45269d20e6f61ecf35084ffa270917afcdb7cd4d8061", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, optional: false]}]}, - "idna": {:hex, :idna, "5.1.1", "cbc3b2fa1645113267cc59c760bafa64b2ea0334635ef06dbac8801e42f7279c", [:rebar3], [{:unicode_util_compat, "0.3.1", [repo: "hexpm", hex: :unicode_util_compat, optional: false]}], "hexpm"}, + "idna": {:hex, :idna, "5.1.2", "e21cb58a09f0228a9e0b95eaa1217f1bcfc31a1aaa6e1fdf2f53a33f7dbd9494", [:rebar3], [{:unicode_util_compat, "0.3.1", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm"}, "jason": {:hex, :jason, "1.0.0", "0f7cfa9bdb23fed721ec05419bcee2b2c21a77e926bce0deda029b5adc716fe2", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, optional: true]}]}, "jsx": {:hex, :jsx, "2.8.3", "a05252d381885240744d955fbe3cf810504eb2567164824e19303ea59eef62cf", [:mix, :rebar3], []}, "junit_formatter": {:hex, :junit_formatter, "2.1.0", "ff03d2bbe9a67041f2488d8e72180ddcf4dff9e9c8a39b79eac9828fcb9e9bbf", [:mix], []},