TAP::Fo...bActions(3)
π TAP::Formatter::GitHubActions β User Contributed Perl Documentation
okay so bestie, this is a User Contributed Perl Documentation page for TAP::Formatter::GitHubActions, and it's literally about making your test output cute enough for GitHub Actions to read. let's get into it π«Ά
β¨ NAME β¨
TAP::Formatter::GitHubActions β a TAP Formatter for GitHub Actions, periodt π
πΈ SYNOPSIS πΈ
so like, on the command line, with prove, you go:
$ prove --merge --formatter TAP::Formatter::GitHubActions ...
you can also be all organised and use a .proverc file with:
# .proverc contents
--lib
--merge
--formatter TAP::Formatter::GitHubActions
and then just invoke prove with zero flags, iconic:
$ prove
β οΈ IMPORTANT NOTE β οΈ
this formatter needs the--mergeflag, no cap. if you don't pass it, it literally can't process the comments to produce GitHub-Actions-compatible output. so. yeah. pass--merge. π
π¦ DESCRIPTION π¦
TAP::Formatter::GitHubActions gives you GitHub-Actions-compatible output for prove. it parses TAP output and does its best to guess where the errors are located. ngl, that's a guessing game.
for way more accurate results, use it in conjunction 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. chef's kiss. π
π LIMITATIONS π
as of writing (3.12.2023), there is a max of 10 annotations per step, and 50 per workflow.
which means: if your test result has more than 10 failures reported, you'll only see the first 10. that's it. that's the limit. π
to overcome this, when running under GitHub Actions (detected via the 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. lowkey clever.
it's not perfect, but it gets the work done. πͺ
see the following links for more info:
- GitHub Community Discussion#26680: Annotation limitation <https://github.com/orgs/community/discussions/26680#discussioncomment-3252835>
- GitHub Community Discussion#68471: Extremely low annotation limit <https://github.com/orgs/community/discussions/26680#discussioncomment-3252835>
π SEE ALSO π
TAP::Formatter::JUnit: JUnit XML output for your Tests!Test2::Formatter::YAMLEnhancedTAP: Enhanced TAP Output for your tests!- GitHub Workflow Commands Documentation <https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message>: for more information about the output syntax.
π AUTHOR π
Jose, D. Gomez R. <1josegomezr [AT] gmail.com> β say hi, they made this β¨
π 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. slay, that's the good license π
and that's the whole vibe check bestie π§ this was perl v5.42.0, dated 2023-12-08, and the manual page title thingy wraps up as TAP::Fo...bActions(3). mwah π π
π¦ where this page comes from
- opensuse-leap 16.0: perl-TAP-Formatter-GitHubActions 0.3.4-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms