Running Cylc in CI


We are setting up some Cylc (8) workflows and wishing to add some low resolution cycling workflows into our on-premises continuous integration (CI). When issuing the cylc commands to run the workflow everything runs in the background so it seems we would need to introduce some continuous polling to establish whether the run was successful for the purposes of reporting pass/fail to the GitHub pull request. Do you have any advice for doing this? Is there a simple thing to force a foreground execution that passes back an error code? I had a look through the cylc play options but didn’t see anything that might help.

Many thanks,

Hi, try cylc play --no-detach, this runs the workflow in the foreground and sets the return code.

For automated testing you might want to configure some event handlers, e.g. the inactivity and stalled event handlers, to shut down workflows in the event tasks fail or something goes wrong.[scheduler][events]

There’s also the --abort-if-any-task-fails option for cylc play which can come in handy.

Thank you very much. This is incredibly helpful.