DEVX-126: ci: consolidate CI and post-merge workflows
Post-merge / detect-and-configure (push) Successful in 20s
Post-merge / release-and-maintain (push) Successful in 46s

This commit was merged in pull request #190.
This commit is contained in:
2026-07-12 01:52:40 +00:00
parent ed0dfce98b
commit cb84dae050
7 changed files with 421 additions and 558 deletions
+8
View File
@@ -34,19 +34,25 @@ class TestRun:
class TestInstallPythonDeps:
@patch("devx.tools.setup.subprocess.run")
@patch.dict(os.environ, {}, clear=False)
def test_install_dev(self, mock_run: MagicMock) -> None:
os.environ.pop("PIP_BREAK_SYSTEM_PACKAGES", None)
mock_run.return_value = MagicMock(returncode=0)
_install_python_deps(".venv/bin", "dev")
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[dev]"], check=False)
@patch("devx.tools.setup.subprocess.run")
@patch.dict(os.environ, {}, clear=False)
def test_install_ci(self, mock_run: MagicMock) -> None:
os.environ.pop("PIP_BREAK_SYSTEM_PACKAGES", None)
mock_run.return_value = MagicMock(returncode=0)
_install_python_deps(".venv/bin", "ci")
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[ci]"], check=False)
@patch("devx.tools.setup.subprocess.run")
@patch.dict(os.environ, {}, clear=False)
def test_install_custom_extras(self, mock_run: MagicMock) -> None:
os.environ.pop("PIP_BREAK_SYSTEM_PACKAGES", None)
mock_run.return_value = MagicMock(returncode=0)
_install_python_deps(".venv/bin", "ci,lint")
mock_run.assert_called_once_with([".venv/bin/pip", "install", "-e", ".[ci,lint]"], check=False)
@@ -71,7 +77,9 @@ class TestInstallPythonDeps:
)
@patch("devx.tools.setup.subprocess.run")
@patch.dict(os.environ, {}, clear=False)
def test_install_failure_without_break_system(self, mock_run: MagicMock) -> None:
os.environ.pop("PIP_BREAK_SYSTEM_PACKAGES", None)
mock_run.return_value = MagicMock(returncode=1)
with pytest.raises(subprocess.CalledProcessError):
_install_python_deps(".venv/bin", "ci")