Add ML Service test job to CI workflow

- Add test-ml-service job for conversation-assistant changes
- Configure Python 3.12 with uv package manager
- Use Forgejo PyPI registry for private packages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lilith 2026-01-02 23:25:38 -08:00
parent 836801bad0
commit 45013be804

View file

@ -162,3 +162,52 @@ jobs:
name: landing-e2e-results
path: features/landing/frontend-public/test-results/
retention-days: 7
# =============================================================================
# Python Services
# =============================================================================
test-ml-service:
name: Test ML Service
runs-on: ubuntu-latest
needs: detect-changes
if: contains(needs.detect-changes.outputs.affected_features, 'conversation-assistant')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Configure Forgejo PyPI registry
run: |
mkdir -p ~/.config/pip
cat > ~/.config/pip/pip.conf << EOF
[global]
extra-index-url = https://__token__:${{ secrets.FORGEJO_TOKEN }}@forge.nasty.sh/api/packages/lilith/pypi/simple/
EOF
- name: Install dependencies
working-directory: features/conversation-assistant/ml-service
run: |
~/.local/bin/uv venv
~/.local/bin/uv pip install -e ".[dev]"
- name: Run tests
working-directory: features/conversation-assistant/ml-service
run: |
source .venv/bin/activate
python -m pytest tests/ -v --tb=short
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: ml-service-test-results
path: features/conversation-assistant/ml-service/.pytest_cache/
retention-days: 7