Skip to content

[Repo Assist] ci: run pytest for Python chat service in build-python jobΒ #522

@github-actions

Description

@github-actions

πŸ€– Repo Assist here β€” I'm an automated AI assistant for this repository.

The Garage.ChatService already ships 12 pytest unit tests (test_prompt_loader.py) and a requirements-test.txt, but the build-python CI job only ran a py_compile syntax check β€” the tests were never executed in CI.

What changed

.github/workflows/ci.yml β€” build-python job:

  1. Install test dependencies β€” adds pip install -r requirements-test.txt after the main requirements install.
  2. Run pytest β€” adds a Test step (pytest -v) after the syntax check.
  3. Fix pip cache key β€” expands cache-dependency-path to include both requirements.txt and requirements-test.txt, so the cache invalidates correctly when test-only packages change.

No other files are changed.

Test Status

Check Result
pytest -v test_prompt_loader.py (local) βœ… 12 passed in 0.04 s
test_prompt_loader.py::TestRenderMessages::test_substitutes_single_variable PASSED
test_prompt_loader.py::TestRenderMessages::test_substitutes_multiple_variables PASSED
test_prompt_loader.py::TestRenderMessages::test_leaves_unmatched_placeholder_unchanged PASSED
test_prompt_loader.py::TestRenderMessages::test_empty_messages_returns_empty_list PASSED
test_prompt_loader.py::TestRenderMessages::test_preserves_message_roles PASSED
test_prompt_loader.py::TestRenderMessages::test_returns_new_list_not_mutation PASSED
test_prompt_loader.py::TestGetModelParameters::test_returns_model_parameters PASSED
test_prompt_loader.py::TestGetModelParameters::test_returns_empty_dict_when_missing PASSED
test_prompt_loader.py::TestGetModelParameters::test_returns_empty_dict_for_empty_parameters PASSED
test_prompt_loader.py::TestLoadPrompt::test_loads_valid_prompt_file PASSED
test_prompt_loader.py::TestLoadPrompt::test_raises_file_not_found_for_missing_prompt PASSED
test_prompt_loader.py::TestLoadPrompt::test_loads_prompt_with_default_directory PASSED

Generated by Repo Assist

Generated by Repo Assist Β· β—·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@06bf149d12d83f09e2a52914afab936e9c8b6dd4

Warning

πŸ›‘οΈ Protected Files β€” Push Permission Denied

This was originally intended as a pull request, but the patch modifies protected files: .github/workflows/ci.yml.

The push was rejected because GitHub Actions does not have workflows permission to push these changes, and is never allowed to make such changes, or other authorization being used does not have this permission. A human must create the pull request manually.

To create a pull request with the changes:

# Download the patch from the workflow run
gh run download 23052555012 -n agent-artifacts -D /tmp/agent-artifacts-23052555012

# Create a new branch
git checkout -b repo-assist/eng-ci-python-pytest-20260313-e43617198023e8b1 main

# Apply the patch (--3way handles cross-repo patches)
git am --3way /tmp/agent-artifacts-23052555012/aw-repo-assist-eng-ci-python-pytest-20260313.patch

# Push the branch and create the pull request
git push origin repo-assist/eng-ci-python-pytest-20260313-e43617198023e8b1
gh pr create --title '[Repo Assist] ci: run pytest for Python chat service in build-python job' --base main --head repo-assist/eng-ci-python-pytest-20260313-e43617198023e8b1 --repo askpt/openfeature-aspire-sample

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions