brew/Library/Homebrew/macos_runner_spec.rb
Carlo Cabrera 3588f1b8c5
github_runner_matrix: filter incompatible testing formulae
`brew test-bot` can occasionally spend a long time doing nothing when
testing dependents.[^1] This is because it takes a long time to work out
that there is nothing to do.

To fix this, let's adjust `brew determine-test-runners` to pass on only
the list of formulae for which there is work to be done so that
`brew test-bot` doesn't need to waste time working this out.

[^1]: For example, it spends about 15 minutes doing nothing at https://github.com/Homebrew/homebrew-core/actions/runs/10500178069/job/29133091332?pr=180185
2024-08-26 08:10:31 +08:00

30 lines
583 B
Ruby

# typed: strict
# frozen_string_literal: true
class MacOSRunnerSpec < T::Struct
const :name, String
const :runner, String
const :timeout, Integer
const :cleanup, T::Boolean
prop :testing_formulae, T::Array[String], default: []
sig {
returns({
name: String,
runner: String,
timeout: Integer,
cleanup: T::Boolean,
testing_formulae: String,
})
}
def to_h
{
name:,
runner:,
timeout:,
cleanup:,
testing_formulae: testing_formulae.join(","),
}
end
end