Change the test running options in pipelines
The options for tests in CI jobs/pipelines don't seem to offer quite what I need for sandbox deployments. Specifically, I want to be able to run all the tests when class/flow/trigger metadata is changing but no tests when tests metadata do not change.
This is possible to do when deploying to production orgs by using the "Salesforce default tests" option (see https://docs.gearset.com/en/articles/1376067-setting-apex-test-levels). But it is not possible in sandboxes.
In sandboxes, the "Salesforce default tests" option runs no tests at all which I don't want. I also don't want to run "All your tests" because if merging a branch with only README.md changes I don't want all the tests to run since there is nothing actually being deployed. I can use "Specify tests to run" to limit the tests running to only those relevant to the metadata being deployed which works to an extent, but it means I can't run all the tests, only those matching the specific metadata.
Ideally I want the "Salesforce default tests" behaviour for production orgs to be available for use on sandbox orgs too. I also note from the docs that the "Run no tests" option appears to be superfluous in CI Jobs - if its a sandbox, using the "Salesforce default tests" option achieves the same thing. If its production, that setting is ignored anyway and "Salesforce default tests" is used.
