[extra-02] install and configure junit formatter
With this change it's possible to generate test report that can be used alongside continuous integration routine.
This commit is contained in:
parent
0614dfd608
commit
cd2f062ef5
30
.gitignore
vendored
30
.gitignore
vendored
@ -1,28 +1,14 @@
|
|||||||
# The directory Mix will write compiled artifacts to.
|
# paths
|
||||||
/_build/
|
/_build/
|
||||||
|
|
||||||
# If you run "mix test --cover", coverage assets end up here.
|
|
||||||
/cover/
|
/cover/
|
||||||
|
/report/
|
||||||
# The directory Mix downloads your dependencies sources to.
|
|
||||||
/deps/
|
/deps/
|
||||||
|
|
||||||
# Where 3rd-party dependencies like ExDoc output generated docs.
|
|
||||||
/doc/
|
/doc/
|
||||||
|
|
||||||
# Ignore .fetch files in case you like to edit your project deps locally.
|
|
||||||
/.fetch
|
/.fetch
|
||||||
|
|
||||||
# If the VM crashes, it generates a dump, let's ignore it too.
|
|
||||||
erl_crash.dump
|
|
||||||
|
|
||||||
# Also ignore archive artifacts (built via "mix archive.build").
|
|
||||||
*.ez
|
|
||||||
|
|
||||||
# Ignore package tarball (built via "mix hex.build").
|
|
||||||
wabanex-*.tar
|
|
||||||
|
|
||||||
# Since we are building assets from assets/,
|
|
||||||
# we ignore priv/static. You may want to comment
|
|
||||||
# this depending on your deployment strategy.
|
|
||||||
/priv/static/
|
/priv/static/
|
||||||
|
/priv/plts/
|
||||||
|
|
||||||
|
# files
|
||||||
|
erl_crash.dump
|
||||||
|
*.ez
|
||||||
|
wabanex-*.tar
|
||||||
|
@ -20,3 +20,10 @@ config :wabanex, WabanexWeb.Endpoint,
|
|||||||
|
|
||||||
# Print only warnings and errors during test
|
# Print only warnings and errors during test
|
||||||
config :logger, level: :warn
|
config :logger, level: :warn
|
||||||
|
|
||||||
|
config :junit_formatter,
|
||||||
|
report_file: "test_report.xml",
|
||||||
|
report_dir: "report/test",
|
||||||
|
automatic_create_dir?: true,
|
||||||
|
include_filename?: true,
|
||||||
|
include_file_line?: true
|
||||||
|
16
mix.exs
16
mix.exs
@ -15,9 +15,6 @@ defmodule Wabanex.MixProject do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Configuration for the OTP application.
|
|
||||||
#
|
|
||||||
# Type `mix help compile.app` for more information.
|
|
||||||
def application do
|
def application do
|
||||||
[
|
[
|
||||||
mod: {Wabanex.Application, []},
|
mod: {Wabanex.Application, []},
|
||||||
@ -25,13 +22,9 @@ defmodule Wabanex.MixProject do
|
|||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Specifies which paths to compile per environment.
|
|
||||||
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
||||||
defp elixirc_paths(_), do: ["lib"]
|
defp elixirc_paths(_), do: ["lib"]
|
||||||
|
|
||||||
# Specifies your project dependencies.
|
|
||||||
#
|
|
||||||
# Type `mix help deps` for examples and options.
|
|
||||||
defp deps do
|
defp deps do
|
||||||
[
|
[
|
||||||
{:phoenix, "~> 1.5.9"},
|
{:phoenix, "~> 1.5.9"},
|
||||||
@ -49,16 +42,11 @@ defmodule Wabanex.MixProject do
|
|||||||
{:crudry, "~> 2.4.0"},
|
{:crudry, "~> 2.4.0"},
|
||||||
{:pg_ranges, "~> 1.1"},
|
{:pg_ranges, "~> 1.1"},
|
||||||
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
|
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
|
||||||
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false}
|
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
|
||||||
|
{:junit_formatter, "~> 3.1", only: [:test]}
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Aliases are shortcuts or tasks specific to the current project.
|
|
||||||
# For example, to install project dependencies and perform other setup tasks, run:
|
|
||||||
#
|
|
||||||
# $ mix setup
|
|
||||||
#
|
|
||||||
# See the documentation for `Mix` for more info on aliases.
|
|
||||||
defp aliases do
|
defp aliases do
|
||||||
[
|
[
|
||||||
setup: ["deps.get", "ecto.setup"],
|
setup: ["deps.get", "ecto.setup"],
|
||||||
|
1
mix.lock
1
mix.lock
@ -17,6 +17,7 @@
|
|||||||
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
|
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
|
||||||
"gettext": {:hex, :gettext, "0.18.2", "7df3ea191bb56c0309c00a783334b288d08a879f53a7014341284635850a6e55", [:mix], [], "hexpm", "f9f537b13d4fdd30f3039d33cb80144c3aa1f8d9698e47d7bcbcc8df93b1f5c5"},
|
"gettext": {:hex, :gettext, "0.18.2", "7df3ea191bb56c0309c00a783334b288d08a879f53a7014341284635850a6e55", [:mix], [], "hexpm", "f9f537b13d4fdd30f3039d33cb80144c3aa1f8d9698e47d7bcbcc8df93b1f5c5"},
|
||||||
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
|
"jason": {:hex, :jason, "1.2.2", "ba43e3f2709fd1aa1dce90aaabfd039d000469c05c56f0b8e31978e03fa39052", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "18a228f5f0058ee183f29f9eae0805c6e59d61c3b006760668d8d18ff0d12179"},
|
||||||
|
"junit_formatter": {:hex, :junit_formatter, "3.3.0", "bd7914d92885f7cf949dbe1dc6bacf76badfb2c1f5f7b3f9433c20e5b6ec42c8", [:mix], [], "hexpm", "4d040410925324b155ae4c7d41e884a0cdebe53b917bee4f22adf152e987a666"},
|
||||||
"mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"},
|
"mime": {:hex, :mime, "1.6.0", "dabde576a497cef4bbdd60aceee8160e02a6c89250d6c0b29e56c0dfb00db3d2", [:mix], [], "hexpm", "31a1a8613f8321143dde1dafc36006a17d28d02bdfecb9e95a880fa7aabd19a7"},
|
||||||
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
|
"nimble_parsec": {:hex, :nimble_parsec, "1.1.0", "3a6fca1550363552e54c216debb6a9e95bd8d32348938e13de5eda962c0d7f89", [:mix], [], "hexpm", "08eb32d66b706e913ff748f11694b17981c0b04a33ef470e33e11b3d3ac8f54b"},
|
||||||
"pg_ranges": {:hex, :pg_ranges, "1.1.0", "cfac1ee59958213cd6b066cc8bb5d63f6af7f830fa05fc633f33ee5da7876c94", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto_sql, ">= 3.3.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm", "2750f923666f548572e73b1636066196d7bd47ea2c63a1ad2c31692d16fd8590"},
|
"pg_ranges": {:hex, :pg_ranges, "1.1.0", "cfac1ee59958213cd6b066cc8bb5d63f6af7f830fa05fc633f33ee5da7876c94", [:mix], [{:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:ecto_sql, ">= 3.3.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm", "2750f923666f548572e73b1636066196d7bd47ea2c63a1ad2c31692d16fd8590"},
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
ExUnit.configure(formatters: [JUnitFormatter, ExUnit.CLIFormatter])
|
||||||
ExUnit.start()
|
ExUnit.start()
|
||||||
Ecto.Adapters.SQL.Sandbox.mode(Wabanex.Repo, :manual)
|
Ecto.Adapters.SQL.Sandbox.mode(Wabanex.Repo, :manual)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user