Skip to content

Adding support for CI hooks #3

@tapegram

Description

@tapegram

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

  • Identify some key lifecycle events. Maybe Pushed (to main) and Released?
  • Identify some function name/signature to use as a convention (maybe ci : ShareEvent -> {IO, Exception} ())
  • When events are triggered, if this function exists in the project, run the CI function?

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 ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions