stable-channels
stable-channels copied to clipboard
cln-plugin: make it more universally useable + tests + CI
Hi, interesting project you have here. I saw that you had no tests for you cln-plugin and since i'm a cln plugin dev myself i thought i'd help you get started on that. This PR contains:
- Some fixes to make the plugin less dependable on hard coded stuff like the log file paths, the python env path
- Removed the need to pass in the rpc path, we can get it from the plugin
- I added the execution bit to the plugin file so not everyone has to do it again
- Also replaced all
print's withplugin.logsinceprintshould not be used in cln plugins (or atleast you should not write non json-rpc line to stdout) - Boolean options can be passed in as
strorboolso i handled both cases - Added a basic startup test that runs the
check_stablesfunction once (i've added adev_check_stablesrpc method to the plugin for this) and triggers thehandle_coin_movementevent - Added CI that will run the tests for the cln plugin on every PR and on commits to main (you can test more cln versions by copying
main_v24.02.ymland editing the versions)
This is super awesome, definitely the first substantial external contributions to this project. Thank you so much.
Looks great.