wftest YAML runner: add schedule and event trigger types#369
Merged
Conversation
Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/9b9c11ba-fdb7-42ff-92d6-aee0baa7bc65
Copilot
AI
changed the title
[WIP] Add support for schedule and event trigger types in YAML runner
wftest YAML runner: add schedule and event trigger types
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds missing trigger coverage to the wftest YAML test runner so YAML-defined tests can exercise scheduled and event-driven pipelines using existing harness capabilities.
Changes:
- Extended
fireTrigger()to supportscheduletriggers viaHarness.FireSchedule(name, data). - Extended
fireTrigger()to supporteventandeventbustriggers viaHarness.FireEvent(topic, data). - Added YAML runner tests covering schedule triggers (with/without data) and event triggers (
eventandeventbusalias).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
wftest/yaml_runner.go |
Adds schedule and event/eventbus trigger dispatch in the YAML runner. |
wftest/yaml_runner_test.go |
Adds integration-style YAML runner tests for the new trigger types and aliasing behavior. |
⏱ Benchmark Results✅ No significant performance regressions detected. benchstat comparison (baseline → PR)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RunYAMLTestsonly supportedpipelineand HTTP trigger types, leaving schedule and event-driven pipelines untestable via the YAML format despiteHarness.FireSchedule()andHarness.FireEvent()existing.Changes
wftest/yaml_runner.go— addedscheduleandevent/eventbuscases tofireTrigger():schedule→h.FireSchedule(trigger.name, trigger.data)event/eventbus→h.FireEvent(trigger.name, trigger.data)(name is the topic)trigger.nameis emptywftest/yaml_runner_test.go— added tests for schedule trigger, schedule trigger with data params, event trigger (type: event), and eventbus alias (type: eventbus)Usage
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.