Skip to content

dev/ci: rewrite computeRunType to use structured RunTypeMatchers

Warren Gifford requested to merge ci/runtype-structured-matcher into main

Created by: bobheadxi

Rewrite computeRunType to use structured RunTypeMatchers provided by each RunType to allow us to understand how a RunType is determined after the fact. See this in action in https://github.com/sourcegraph/sourcegraph/pull/30532. Demonstrative example:

https://github.com/sourcegraph/sourcegraph/blob/e562df81b1473c9f3b9b08a5cb16268e3bc21243/enterprise/dev/ci/internal/ci/runtype.go#L46-L54

Also introduces testing that iterates over RunTypes and ensures each has relevant properties defined, as well as tests covering some of the new and old functionality.

Merge request reports

Loading