kubevirt.core collection cross testing (#731)

* Initial

* update python version

* update python version

* checkout local version of collection

* add integration job

* indent

* Set workflow as non blocking
This commit is contained in:
Bikouo Aubin
2024-05-30 15:34:29 +02:00
committed by GitHub
parent 072a08091b
commit c0666a5137
2 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import os
import sys
from pathlib import PosixPath
def main():
src = sys.argv[1]
path = PosixPath(src) / PosixPath("tests/integration/targets/")
def _is_disable(path):
flags = ("unsupported", "disabled", "unstable", "hidden")
aliases_path = path / PosixPath("aliases")
return (aliases_path.exists() and any((d.startswith(flags) for d in aliases_path.read_text().split("\n"))))
targets = [i.stem for i in path.glob("*") if i.is_dir() and not _is_disable(i)]
with open(os.environ.get("GITHUB_OUTPUT"), "a", encoding="utf-8") as fw:
fw.write(f"kubevirt_targets={targets}\n")
if __name__ == "__main__":
main()