ci: add test pipeline, PyPI release workflow, and lint fixes

- Update Woodpecker to run unit and integration tests in parallel
- Add GitHub Actions workflow for PyPI trusted publishing on main
- Add license, classifiers, keywords, and URLs to pyproject.toml
- Fix ruff lint errors (unused imports, duplicate class name) and formatting
This commit is contained in:
2026-04-23 18:32:59 +06:00
parent ad64c85393
commit 68c7d0de42
18 changed files with 303 additions and 280 deletions

View File

@ -179,9 +179,7 @@ class TestCommands:
assert result.exit_code == 42
def test_run_with_envs(self):
result = self.capsule.commands.run(
"export MY_VAR=test_value && echo $MY_VAR"
)
result = self.capsule.commands.run("export MY_VAR=test_value && echo $MY_VAR")
assert "test_value" in result.stdout
def test_run_with_cwd(self):
@ -195,9 +193,7 @@ class TestCommands:
assert len(lines) == 3
def test_run_background(self):
handle = self.capsule.commands.run(
"sleep 30", background=True, tag="bg-test"
)
handle = self.capsule.commands.run("sleep 30", background=True, tag="bg-test")
assert isinstance(handle, CommandHandle)
assert handle.pid > 0
assert handle.tag == "bg-test"
@ -206,9 +202,7 @@ class TestCommands:
self.capsule.commands.kill(handle.pid)
def test_list_processes(self):
handle = self.capsule.commands.run(
"sleep 30", background=True, tag="list-test"
)
handle = self.capsule.commands.run("sleep 30", background=True, tag="list-test")
try:
time.sleep(0.5)
processes = self.capsule.commands.list()
@ -222,9 +216,7 @@ class TestCommands:
self.capsule.commands.kill(handle.pid)
def test_kill_process(self):
handle = self.capsule.commands.run(
"sleep 30", background=True
)
handle = self.capsule.commands.run("sleep 30", background=True)
self.capsule.commands.kill(handle.pid)
time.sleep(0.5)