-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally generate build_report.json #38
Optionally generate build_report.json #38
Conversation
This pull request has been linked to Shortcut Story #27167: Extend build pipeline to gather stats on failure reason. |
…line-to-gather-stats-on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more tests perhaps?
--ra | ||
--stats | ||
""" | ||
def incompatible_args_error do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json-report cannot be set with debug.
say that here
@@ -0,0 +1,17 @@ | |||
defmodule BuildPipeline.Run.JsonReport do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write a test that at this level that asserts a file gets written?
use Mimic to not actually write a file?
I'm open to you saying "nah, i dont think its needed"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but thats what I'd do I think
@@ -123,6 +135,10 @@ defmodule BuildPipeline.Run.CommandLineArguments do | |||
{:ok, Map.put(setup, :show_stats, true)} | |||
end | |||
|
|||
defp put_setup_from_singular_cli_arg(setup, @json_report) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've TDD'd adding a new command line arg by adding a high level test
either at the server_test or run_test (cant remember which) level.
Add such a high level test for json report?
I'm open to pushback on this, but that is how I added all the other CLI args anyhow
Adds a
--json-report
flag which can be used to generate a json report which looks something like this:Test by running:
MIX_ENV=prod mix escript.build