If we had an environment variable, like BUILDKITE_LAST_GREEN_COMMIT then we could use it to reliably run diff based CI.
Linters only need to run on things that changed
Only tests in modules that changed need to run
All your hopes and dreams 🦄
Currently it's possible to have untested skipped builds, or builds that failed. In these cases the diff for the current commit is insufficient to know what needs to be tested.
Ideally the "last" green commit is chronological based on the commit date, not just the order the builds were added.
If there is no green commit on the current branch then it's possible to go through the commit history, alternatively it would be fine for the environment variable to not be set/present.
If we had an environment variable, like
BUILDKITE_LAST_GREEN_COMMIT
then we could use it to reliably run diff based CI.Currently it's possible to have untested skipped builds, or builds that failed. In these cases the diff for the current commit is insufficient to know what needs to be tested.
Ideally the "last" green commit is chronological based on the commit date, not just the order the builds were added.
If there is no green commit on the current branch then it's possible to go through the commit history, alternatively it would be fine for the environment variable to not be set/present.