anze3db / fedidevs

Discover amazing developers across the fediverse 🌐
https://fedidevs.com
MIT License
13 stars 6 forks source link

Add Dagger Pipeline #36

Closed levlaz closed 2 weeks ago

levlaz commented 2 months ago

This commit adds a Dagger Pipeline to the project that allows us to run CI locally and on any other CI provider.

It includes a new GitHub job action which shows what this might look like if you run it there.

The main benefit is that we can run the pipeline locally without having to install any dependencies other than the Dagger CLI and a container runtime.

Right now there are two functions implemented.

test()

This function runs pytest and if a valid FLAKYTEST_SECRET_TOKEN token is provided, it will send telemetry to flakytest.dev. This provides a simple POC of what a flakytest module may look like in the future. Given a source directory and a valid python token, this will execute pytest and send the telemetry to the right place.

ci()

This function runs test() and in the future will run deploy() the idea here is that you turn each CI job into its own function that you can run on its own, and compose these together using a function like this.

anze3db commented 2 months ago

@levlaz thanks for opening a PR, I think I now understand the idea behind Dagger. It looks pretty cool!

I think a flakytest Dagger module would make sense if I had a way to parse the results and upload in a separate step (like codecov). I'll see if I decide to move flakytest in this direction. My main worry is that there are many other tools that do flaky test detection this way.

levlaz commented 2 weeks ago

closing this one since it was more of a proof of concept