MixAffected.Report (MixAffected v0.1.0)

Copy Markdown View Source

Compares a saved selection with the failures of the last full mix test.

ExUnit records failures in its failures manifest, the file mix test --failed reads: <Mix.Project.manifest_path()>/.mix_test_failures (or config :ex_unit, failures_manifest_path:), holding :erlang.term_to_binary({1, %{{module, test_name} => absolute_test_file}}), or {1, :all} when the run crashed (Elixir 1.18 and 1.19: see the private ExUnit.FailuresManifest module and Mix.Tasks.Test). Any other shape is reported as no failures plus a warning: this is shadow data and must never crash CI.

Summary

Functions

The v1 report for a decoded selection JSON, plus warnings for stderr. Failed files are made relative to root.

The failures manifest mix test writes in the current project.

Functions

build(selection, manifest, root)

@spec build(map(), Path.t(), Path.t()) :: {map(), [String.t()]}

The v1 report for a decoded selection JSON, plus warnings for stderr. Failed files are made relative to root.

manifest_path()

@spec manifest_path() :: Path.t()

The failures manifest mix test writes in the current project.