TAP::Fo...bActions(3)

πŸ“¦ version 0.3.4, in opensuse-leap 16.0

πŸ’… 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 --merge flag, 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:


πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ AUTHOR πŸ‘‘

Jose, D. Gomez R. <1josegomezr [AT] gmail.com> β€” say hi, they made this ✨


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