Skip to content

Commit a8eb9ad

Browse files
committed
Run manually added tox env tests on windows too
1 parent 76c8452 commit a8eb9ad

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/generate_workflows.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini")
1010
workflows_directory_path = Path(__file__).parent
1111

12-
generate_test_workflow(tox_ini_path, workflows_directory_path, "ubuntu-latest")
12+
generate_test_workflow(
13+
tox_ini_path, workflows_directory_path, "ubuntu-latest", "windows-latest"
14+
)
1315
generate_lint_workflow(tox_ini_path, workflows_directory_path)
1416
generate_misc_workflow(tox_ini_path, workflows_directory_path)

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
5555
"py312": "3.12",
5656
}
5757

58+
# we enable windows testing only for packages with windows specific code paths
59+
per_tox_env_os_enablement = {
60+
"windows-latest": {
61+
"py312-test-instrumentation-botocore",
62+
"py312-test-instrumentation-system-metrics",
63+
},
64+
}
65+
5866
test_job_datas = []
5967

6068
for operating_system in operating_systems:
@@ -71,6 +79,14 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
7179
]
7280
tox_env = tox_test_env_match.string
7381

82+
# if we have an entry for the os add only jobs for tox env manually configured
83+
packages_manually_enabled = per_tox_env_os_enablement.get(
84+
operating_system
85+
)
86+
if packages_manually_enabled:
87+
if tox_env not in packages_manually_enabled:
88+
continue
89+
7490
test_requirements = groups["test_requirements"]
7591

7692
if test_requirements is None:

0 commit comments

Comments
 (0)