NAME

TAP::Formatter::GitHubActions - TAP Formatter for GitHub Actions

SYNOPSIS

On the command line, with prove:

$ prove --merge --formatter TAP::Formatter::GitHubActions ...

You can also use a .proverc file with

# .proverc contents
--lib
--merge
--formatter TAP::Formatter::GitHubActions

And then invoke prove without flags:

$ prove

IMPORTANT NOTE

This formatter needs the --merge flag, else it won't be able to process the comments to produce GitHub-Actions-compatible output.

DESCRIPTION

TAP::Formatter::GitHubActions provides GitHub-Actions-compatible output for prove.

It parses TAP output and tries it's best to guess where errors are located. For more accurate results, use in cojunction with Test2::Formatter::YAMLEnhancedTAP.

Test2::Formatter::YAMLEnhancedTAP enriches the TAP output generated by Test2 and friends (Test::More, Test::Most) with an additional context in YAML format (compliant with TAP version 13) that includes the precise location of the failure.

LIMITATIONS

As of writting (3.12.2023), there is a max of 10 annotations per step, 50 per workflow.

That means: If your test result has more than 10 failures reported, you'll only see the first 10.

To overcome this, when running under GitHub Actions (detected via `GITHUB_ACTIONS` env var), the formatter writes into the workflow summary and then writes one notice on the very top of the failing file with a link to the summary.

It's not perfect, but gets the work done.

See the following links for more info:

- GitHub Community Discussion#26680: Annotation limitation

- GitHub Community Discussion#68471: Extremely low annotation limit

SEE ALSO

AUTHOR

Jose, D. Gomez R. <1josegomezr [AT] gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2023 by Jose D. Gomez R.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.38.0 or, at your option, any later version of Perl 5 you may have available.