unisoncomputing / share-api

Unison Share's backend server
MIT License
23 stars 4 forks source link

Adding support for CI hooks #3

Open tapegram opened 6 months ago

tapegram commented 6 months ago

A feature I would really like to have is being able to trigger CI on pushes to main (or on releases?)

Thinking out loud, but would it be possible to

Might need to figure out how unit tests fit into this as well (Maybe there should be another ciConfig function that returns a CIConfig with some data on how to handle this?). But even with just the above I could do something like

ci event = match event with
  Pushed (Branch "main") -> 
    deployStage
  Released -> 
    result = runIntegrationTests
    if result then deployProd else (throw ErrorThatBlocksRelease)
  _ -> ()

Would also be down to try to contribute for this but would need a lot of help ;)

ChrisPenner commented 6 months ago

We've definitely got notification webhooks on our roadmap actually! The main thing holding us up is that we'd like to implement this feature using unison cloud for parts of it, and we're still figuring out what that integration looks like 😄