plugins icon indicating copy to clipboard operation
plugins copied to clipboard

CI: Add two columns Main and Nightly to the "Available plugins" table in README.md

Open sip-21 opened this issue 1 year ago • 2 comments

This PR is a proposal for how to add two columns Main and Nigthly to the "Available plugins" table in README.md that display badges to indicate plugins' test results:

  • Nigthly: Test results from the last scheduled nightly workflow run.
  • Main: Test results from the last workflow run triggered by a push to master. Workflow runs triggered by a pull request are ignored.

If a plugin has no tests, no badges are displayed.

During above workflow runs JSON data is generated and saved to the badges directory of the (to be created) badges branch, e.g. backup_main.json and backup_nightly.json. If the JSON data for a plugin has changed it is commited and pushed. This JSON data is then exposed through GitHub Pages which allows for the badges to be rendered dynamically.

Notes:

  • Branch badges needs to be created manually and then GitHub pages need to be configured with Source set to Deploy from a branch and with Branch set to badges.
  • Badges are rendered using https://shields.io/ and are cached up to 300 seconds. Therefore, it can take a while for a badge change to be displayed even when doing a page reload. I also noticed that the page sometimes needed to be reloaded in order for the badges to be updated when simply clicking on the Code tab. This may have been due to the browser still caching an older badge.

image Display of badges with the holdinvoice plugin CLN master tests currently failing.

This PR also re-enables CI tests for the feeadjuster plugin by removing it from the list of excluded directories which it was added to erroneously while being unarchived.

Corresponding issue: https://github.com/lightningd/plugins/issues/494

sip-21 avatar Mar 21 '24 09:03 sip-21

@sip-21 is this still good to go? Thinking it's had enough review time?

chrisguida avatar Apr 16 '24 23:04 chrisguida

@sip-21 is this still good to go? Thinking it's had enough review time?

Yes, it has been hanging there for quite some some time now.

I noticed, though, there is a merge conflict now as README.md had an update a few days ago. So I will need to merge in those changes first.

Also as a reminde before triggering the mergebot, these preparation steps need to be done:

  • Branch badges needs to be created
  • GitHub pages needs to be configured with Source set to Deploy from a branch and with Branch set to badges:

Screenshot from 2024-04-16 19-38-04

sip-21 avatar Apr 17 '24 01:04 sip-21