cps-org / cps

Common Package Specification — A cross-tool mechanism for locating software dependencies
https://cps-org.github.io/cps/
Other
91 stars 8 forks source link

Check Sphinx build log in CI #55

Closed mwoehlke closed 2 months ago

mwoehlke commented 3 months ago

Add a script to parse a Sphinx build log and turn it into GitHub Actions formatted messages. Add ability to specify a build log output location to Makefile. Use these to scrape the Sphinx build log in order to report any warnings. Also, propagate the result to another job, which allows the 'build' job to pass with warnings, while the 'check' job will fail.

mwoehlke commented 3 months ago

Okay, as far as I can tell, this "works"... mostly. The "check" job fails if there are warnings, and warnings show up in the Files Changed" tab... but not in the Checks panel in the Conversation tab. I don't know if GitHub removed that feature, or what. In any case, having the "check" job that fails if there are warnings is an improvement.

mwoehlke commented 2 months ago

The check-build-logs.py parsing logic is a little "magic" to me. It would be nice to break the parsing and output file creation into different functions.

Yes, it's a combination of log scraping and mangling diagnostics into the magic format used to report to GHA. I'm not sure how you'd split it; generate an intermediate file (e.g. JSON) from log scraping and have a separate script to turn that into what GHA wants?