Repository: csgoh/roadmapper (language: python)

Issue:
Add Powershell code to also generate roadmaps on Windows
With this PR, it also becomes possible to execute the manual action to generate roadmaps on Windows. As Windows requires specific Powershell code, I had to add a specific step for the Windows runner.


Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 92ecd29..119ca5e 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -72,3 +72,8 @@ jobs:
       if: matrix.os == 'macos-latest'
       run: |
         pytest -m 'macos'
+
+    - name: Tests with marker 'windows'
+      if: matrix.os == 'windows-latest'
+      run: |
+        pytest -m 'windows'
diff --git a/pyproject.toml b/pyproject.toml
index 1250014..35e9233 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -39,5 +39,6 @@ markers = [
     "unit: Unit tests which are not dependent on environment",
     "ubuntu: Tests which only apply to Ubuntu environment",
     "macos: Tests which only apply to macOS environment",
+    "windows: Tests which only apply to Windows environment",
     "genimage: To generate test image",
 ]


Test patch:
diff --git a/src/tests/compare_generated_roadmaps_test.py b/src/tests/compare_generated_roadmaps_test.py
index c0daaec..289806c 100644
--- a/src/tests/compare_generated_roadmaps_test.py
+++ b/src/tests/compare_generated_roadmaps_test.py
@@ -88,3 +88,8 @@ def test_compare_generated_roadmaps_on_ubuntu(self, roadmap_class_to_test, opera
     @pytest.mark.parametrize("roadmap_class_to_test", [ColourThemeExtensive, ColourTheme])
     def test_compare_generated_roadmaps_on_macos(self, roadmap_class_to_test, operating_system_macos):
         generate_and_compare_roadmap_for_specific_platform(operating_system_macos, roadmap_class_to_test)
+
+    @pytest.mark.windows
+    @pytest.mark.parametrize("roadmap_class_to_test", [ColourThemeExtensive, ColourTheme])
+    def test_compare_generated_roadmaps_on_windows(self, roadmap_class_to_test, operating_system_windows):
+        generate_and_compare_roadmap_for_specific_platform(operating_system_windows, roadmap_class_to_test)
diff --git a/src/tests/conftest.py b/src/tests/conftest.py
index 4f0a1bd..5471cfe 100644
--- a/src/tests/conftest.py
+++ b/src/tests/conftest.py
@@ -24,3 +24,11 @@ def operating_system_macos():
     This fixture can be used as test argument to provide string of used OS `Macos`.
     """
     return "Macos"
+
+
+@pytest.fixture(scope="session")
+def operating_system_windows():
+    """
+    This fixture can be used as test argument to provide string of used OS `Windows`.
+    """
+    return "Windows"
diff --git a/src/tests/example_roadmaps/ColourThemeExtensiveWindowsExample.png b/src/tests/example_roadmaps/ColourThemeExtensiveWindowsExample.png
new file mode 100644
index 0000000..4291a12
Binary files /dev/null and b/src/tests/example_roadmaps/ColourThemeExtensiveWindowsExample.png differ
diff --git a/src/tests/example_roadmaps/ColourThemeWindowsExample.png b/src/tests/example_roadmaps/ColourThemeWindowsExample.png
new file mode 100644
index 0000000..b361760
Binary files /dev/null and b/src/tests/example_roadmaps/ColourThemeWindowsExample.png differ