mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Select all available OS'es if test:coverage
label is set
This commit is contained in:
parent
78c6c47349
commit
2e16029108
1 changed files with 12 additions and 0 deletions
12
tools/ci.py
12
tools/ci.py
|
@ -932,6 +932,7 @@ def get_pr_test_labels(
|
|||
"""
|
||||
Set the pull-request labels.
|
||||
"""
|
||||
github_step_summary = os.environ.get("GITHUB_STEP_SUMMARY")
|
||||
gh_event_path = os.environ.get("GITHUB_EVENT_PATH") or None
|
||||
if gh_event_path is None:
|
||||
labels = _get_pr_test_labels_from_api(ctx, repository, pr=pr)
|
||||
|
@ -983,6 +984,17 @@ def get_pr_test_labels(
|
|||
else:
|
||||
ctx.info(f"No test labels for pull-request #{pr} on {repository}")
|
||||
|
||||
if "test:coverage" in test_labels:
|
||||
ctx.info(
|
||||
"Selecting ALL available OS'es because the label 'test:coverage' is set."
|
||||
)
|
||||
selected.add("all")
|
||||
if github_step_summary is not None:
|
||||
with open(github_step_summary, "a", encoding="utf-8") as wfh:
|
||||
wfh.write(
|
||||
"Selecting ALL available OS'es because the label `test:coverage` is set.\n"
|
||||
)
|
||||
|
||||
if "all" in selected:
|
||||
selected = select_all
|
||||
available.clear()
|
||||
|
|
Loading…
Add table
Reference in a new issue