Files
skill-seekers-reference/.github/workflows/test-vector-dbs.yml
yusyus 00c72ea4a3 fix: resolve CI failures across all GitHub Actions workflows
- Fix ruff format issue in doc_scraper.py
- Add pytest skip markers for browser renderer tests when Playwright is
  not installed in CI
- Replace broken Python heredocs in 4 workflow YAML files
  (scheduled-updates, vector-db-export, quality-metrics, test-vector-dbs)
  with python3 -c calls to fix YAML parsing errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:40:45 +03:00

145 lines
4.5 KiB
YAML

# Security Note: This workflow uses only push/pull_request/workflow_dispatch triggers.
# Matrix values are hardcoded constants. No untrusted input is used in run: commands.
name: Test Vector Database Adaptors
on:
push:
branches: [ main, development ]
paths:
- 'src/skill_seekers/cli/adaptors/**'
- 'src/skill_seekers/mcp/tools/vector_db_tools.py'
- 'tests/test_*adaptor.py'
- 'tests/test_mcp_vector_dbs.py'
pull_request:
branches: [ main, development ]
paths:
- 'src/skill_seekers/cli/adaptors/**'
- 'src/skill_seekers/mcp/tools/vector_db_tools.py'
- 'tests/test_*adaptor.py'
- 'tests/test_mcp_vector_dbs.py'
workflow_dispatch:
jobs:
test-adaptors:
name: Test ${{ matrix.adaptor }} Adaptor
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
adaptor: [weaviate, chroma, faiss, qdrant]
python-version: ['3.10', '3.12']
env:
ADAPTOR_NAME: ${{ matrix.adaptor }}
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run adaptor tests
run: |
echo "🧪 Testing $ADAPTOR_NAME adaptor..."
python -m pytest "tests/test_${ADAPTOR_NAME}_adaptor.py" -v --tb=short
- name: Test adaptor integration
run: |
echo "🔗 Testing $ADAPTOR_NAME integration..."
# Create test skill
mkdir -p test_skill/references
echo "# Test Skill" > test_skill/SKILL.md
echo "Test content" >> test_skill/SKILL.md
echo "# Reference" > test_skill/references/ref.md
# Test adaptor packaging
python3 -c "
import os
from pathlib import Path
from skill_seekers.cli.adaptors import get_adaptor
adaptor_name = os.environ['ADAPTOR_NAME']
adaptor = get_adaptor(adaptor_name)
package_path = adaptor.package(Path('test_skill'), Path('.'))
print(f'Package created: {package_path}')
assert package_path.exists(), 'Package file not created'
print(f'Package size: {package_path.stat().st_size} bytes')
"
- name: Upload test package
uses: actions/upload-artifact@v3
with:
name: test-package-${{ env.ADAPTOR_NAME }}-py${{ env.PYTHON_VERSION }}
path: test_skill-${{ env.ADAPTOR_NAME }}.json
retention-days: 7
test-mcp-tools:
name: Test MCP Vector DB Tools
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run MCP vector DB tests
run: |
echo "🧪 Testing MCP vector database tools..."
python -m pytest tests/test_mcp_vector_dbs.py -v --tb=short
test-week2-integration:
name: Week 2 Features Integration Test
runs-on: ubuntu-latest
needs: [test-adaptors, test-mcp-tools]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run Week 2 validation script
run: |
echo "🎯 Running Week 2 feature validation..."
python test_week2_features.py
- name: Create test summary
run: |
echo "## 🧪 Vector Database Testing Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Adaptor Tests" >> $GITHUB_STEP_SUMMARY
echo "✅ Weaviate adaptor - All tests passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Chroma adaptor - All tests passed" >> $GITHUB_STEP_SUMMARY
echo "✅ FAISS adaptor - All tests passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Qdrant adaptor - All tests passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### MCP Tools" >> $GITHUB_STEP_SUMMARY
echo "✅ 8/8 MCP vector DB tests passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Week 2 Integration" >> $GITHUB_STEP_SUMMARY
echo "✅ 6/6 feature tests passed" >> $GITHUB_STEP_SUMMARY