better handle the different matrix types

This commit is contained in:
sommersoft 2022-03-27 21:42:59 -05:00
parent d6e808d5f1
commit 0b12f28a63
1 changed files with 5 additions and 4 deletions

View File

@ -168,10 +168,11 @@ class DownstreamRunner:
tox_base = self.matrix_schema["tox_cmd_build"]["base"]
tox_prefix = self.matrix_schema["tox_cmd_build"]["prefix"]
skip_matrices = []
if isinstance(parsed_matrix, dict):
if "include" in self.matrix_schema["matrix"]:
for item in parsed_matrix:
if (not item[tox_base].startswith(tox_prefix) or
item[tox_base] in self.matrix_exclude
item[tox_base] in self.matrix_exclude or
not item.get("os", "").startswith("ubuntu")
):
skip_matrices.append(item)
continue
@ -181,12 +182,12 @@ class DownstreamRunner:
self.matrix_schema["tox_cmd_build"]["sub"]["replace"],
item[tox_base]
)
#logger.debug("re.sub: %s", item[tox_base])
logger.debug("re.sub: %s", item[tox_base])
for matrice in skip_matrices:
parsed_matrix.remove(matrice)
elif isinstance(parsed_matrix, list):
else:
new_parsed_matrix = []
for item in parsed_matrix:
if str(item) in self.matrix_exclude: