Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add two columns for the main and nightly workflows to the "Available plugins" table in README.md #509

Merged

Conversation

sip-21
Copy link
Collaborator

@sip-21 sip-21 commented Mar 21, 2024

This PR adds two columns for the main and nightly workflows to the "Available plugins" table in README.md that displays badges indicating plugins' test results:

  • nightly: 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 pull requests are ignored.

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

During the above workflow runs various data is generated and saved to the .badges directory of the (to be created) badges branch. It is a two step process:

  1. At the end of the workflow runs (build-and-test and nightly-build-and-test jobs) the test result ("passed" or "failed") for each plugin and Python version is saved to a separate file, e.g. .badges/gather_data/main/backup/python3.12.txt.
  2. In the completion gather job the data from step 1 is collected and written to JSON files , e.g. .badges/backup_main.json and .badges/backup_nightly.json. If the JSON data for a plugin has changed it is committed 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: #494

@sip-21 sip-21 force-pushed the add-ci-workflow-columns-in-readme branch from ea70648 to d35c346 Compare March 30, 2024 00:17
@sip-21 sip-21 changed the title CI: Add two columns Main and Nigthly to the "Available plugins" table in README.md CI: Add two columns Main and Nightly to the "Available plugins" table in README.md Mar 30, 2024
README.md Outdated
| [watchtower][watchtower-client] | Watchtower client for The Eye of Satoshi |
| [webhook][webhook] | Dispatches webhooks based from [event notifications][event-notifications] |
| [zmq][zmq] | Publishes notifications via [ZeroMQ][zmq-home] to configured endpoints |
| Name | Short description | Main ![GitHub Release](https://img.shields.io/github/v/release/ElementsProject/lightning?label=%20&color=393D47) | Nigthly ![Static Badge](https://img.shields.io/badge/master-master?color=393D47) |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Name | Short description | Main ![GitHub Release](https://img.shields.io/github/v/release/ElementsProject/lightning?label=%20&color=393D47) | Nigthly ![Static Badge](https://img.shields.io/badge/master-master?color=393D47) |
| Name | Short description | Main ![GitHub Release](https://img.shields.io/github/v/release/ElementsProject/lightning?label=%20&color=393D47) | Nightly ![Static Badge](https://img.shields.io/badge/master-master?color=393D47) |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change both Main and Nightly to CLN. So it would read "CLN v24.02.1" and "CLN master" right now. I think this makes it way more clear.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sip-21 sip-21 force-pushed the add-ci-workflow-columns-in-readme branch from d35c346 to eb19a7f Compare March 31, 2024 00:44
@chrisguida
Copy link
Collaborator

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

@sip-21
Copy link
Collaborator Author

sip-21 commented Apr 17, 2024

@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 sip-21 force-pushed the add-ci-workflow-columns-in-readme branch from eb19a7f to 3ab9ee0 Compare April 19, 2024 21:23
.ci/test.py Outdated Show resolved Hide resolved
.ci/test.py Outdated

def configure_git():
subprocess.run(["git", "config", "--global", "user.email", '"[email protected]"'])
subprocess.run(["git", "config", "--global", "user.name", '"lightningd"'])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify that this is an automated / bot user

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment: a4cc954

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@chrisguida chrisguida dismissed their stale review May 31, 2024 21:28

comments addressed

@sip-21 sip-21 force-pushed the add-ci-workflow-columns-in-readme branch from 5537199 to ea54b9f Compare May 31, 2024 23:21
@sip-21 sip-21 force-pushed the add-ci-workflow-columns-in-readme branch from 8b378d6 to 26c1d65 Compare May 31, 2024 23:39
@sip-21 sip-21 changed the title CI: Add two columns Main and Nightly to the "Available plugins" table in README.md CI: Add two columns for the main and nigthly workflows to the "Available plugins" table in README.md Jun 1, 2024
Copy link
Collaborator

@chrisguida chrisguida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, I'm super psyched for this feature. Great work!! 🚀

ACK 26c1d65

@sip-21 sip-21 changed the title CI: Add two columns for the main and nigthly workflows to the "Available plugins" table in README.md CI: Add two columns for the main and nightly workflows to the "Available plugins" table in README.md Jun 1, 2024
Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 26c1d65

Very good job guy!

@vincenzopalazzo vincenzopalazzo merged commit e3b4546 into lightningd:master Jun 1, 2024
6 checks passed
@sip-21 sip-21 mentioned this pull request Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants