ubiquity-os / plugins-wishlist

0 stars 2 forks source link

Dockerized Dev Env #40

Open Keyrxng opened 1 month ago

Keyrxng commented 1 month ago

This is experimental and unsure how far it would manage to get but here goes.

Taking inspiration from https://github.com/nektos/act.

To improve the dev experience for working on plugins it would be fantastic if we could cram everything that we need into a container which can be easily used on any OS.

The most important feature of it is the ability to run our workflows locally without the tediousness of repeatedly pushing, waiting 30 secs for start up and 10s-2m to find an error, add logs then rinse and repeat n times.

If this could be streamlined such that our env supports this out of the box, it would make life a dream to work on any kind of plugin.

If we include the kernel itself it ensures consistency across setups, less repos to manage for new contributors etc which might be more attractive?


I don't have a lot of experience with Docker so this is as far as I'll spec this task for now

0x4007 commented 1 month ago

I thought that plugins already can run locally with a local server (localhost) for testing. What is the value of this docker instance?

@gentlementlegen rfc

gentlementlegen commented 1 month ago

I think it solves development for Action plug-ins that are only easy to run within a deployed instance on Github. The way I solve it locally is by running Jest with a mocked payload, which is a bit tedious to setup. However I am unsure how you can solve this through a docket, because you can maybe simply the kernel run but you will still need to use Github UI and a webhook to get it running. And it probably means that each code change you do to the action, you will need to up again your container. But I am curious if you can find any workaround.

Maybe another solution would be to include one jest test in the template that helps running actions locally.