Skip to content

Bump urllib3 from 2.5.0 to 2.6.0 #41

Bump urllib3 from 2.5.0 to 2.6.0

Bump urllib3 from 2.5.0 to 2.6.0 #41

Workflow file for this run

name: Python CI
on:
push:
branches: [main, develop]
paths:
- "src/python/**"
- "pyproject.toml"
- "requirements.lock.txt"
- "requirements.in"
- ".github/workflows/python-ci.yml"
pull_request:
branches: [main, develop]
paths:
- "src/python/**"
- "pyproject.toml"
- "requirements.lock.txt"
- "requirements.in"
- ".github/workflows/python-ci.yml"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
component: ["workshop", "mcp_server/sales_analysis"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.lock.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.lock.txt
- name: Install linting tools
run: |
pip install isort pytest
- name: Lint with ruff
run: |
ruff check src/python/${{ matrix.component }}/ --output-format=github
- name: Check formatting with ruff
run: |
ruff format --check src/python/${{ matrix.component }}/
- name: Check import sorting with isort
run: |
isort --check-only src/python/${{ matrix.component }}/
- name: Verify Python syntax (dry run)
run: |
python -m py_compile src/python/${{ matrix.component }}/*.py || true
find src/python/${{ matrix.component }}/ -name "*.py" -exec python -m py_compile {} \; || true
- name: Test imports
run: |
cd src/python/${{ matrix.component }}
python -c "
import sys
import os
sys.path.insert(0, '.')
# Test core dependencies from requirements.lock.txt
test_imports = [
'asyncio', 'json', 'os', 'sys', 'logging',
'asyncpg', 'openai', 'azure.identity', 'mcp',
'fastapi', 'pydantic', 'httpx', 'aiohttp'
]
failed_imports = []
for module in test_imports:
try:
__import__(module)
print(f'✓ {module}')
except ImportError as e:
failed_imports.append(f'{module}: {e}')
print(f'✗ {module}: {e}')
if failed_imports:
print(f'\\nFailed imports: {len(failed_imports)}')
for failure in failed_imports:
print(f' - {failure}')
sys.exit(1)
else:
print('\\nAll core imports successful!')
"
dependency-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Check for dependency conflicts
run: |
python -m pip install --upgrade pip pip-tools
echo "Checking requirements.lock.txt..."
pip-compile --dry-run --no-emit-index-url requirements.in > /dev/null
echo "Verifying requirements.lock.txt can be installed..."
pip install --dry-run -r requirements.lock.txt
echo "All dependency files are valid!"