- Update CI workflow to Python 3.9-3.12 (from 3.7-3.11) - Python 3.7 and 3.8 no longer available on ubuntu-latest (Ubuntu 24.04) - Add fail-fast: false to continue testing on failures - Update all documentation to reflect Python 3.9+ requirement Files updated: - .github/workflows/tests.yml - New Python versions - README.md - Badge updated to Python 3.9+ - CLAUDE.md - Prerequisites updated - CONTRIBUTING.md - Prerequisites updated - docs/MCP_SETUP.md - Prerequisites updated This fixes the failing GitHub Actions tests.
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, dev ]
|
|
pull_request:
|
|
branches: [ main, dev ]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
python-version: ['3.9', '3.10', '3.11', '3.12']
|
|
exclude:
|
|
# Exclude some combinations to speed up CI
|
|
- os: macos-latest
|
|
python-version: '3.9'
|
|
- os: macos-latest
|
|
python-version: '3.10'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Cache pip packages
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', 'mcp/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install requests beautifulsoup4
|
|
pip install pytest pytest-cov
|
|
if [ -f mcp/requirements.txt ]; then pip install -r mcp/requirements.txt; fi
|
|
|
|
- name: Run CLI tests
|
|
run: |
|
|
python -m pytest tests/test_scraper_features.py -v
|
|
python -m pytest tests/test_config_validation.py -v
|
|
python -m pytest tests/test_integration.py -v
|
|
|
|
- name: Run MCP server tests
|
|
run: |
|
|
python -m pytest tests/test_mcp_server.py -v
|
|
|
|
- name: Generate coverage report
|
|
run: |
|
|
python -m pytest tests/ --cov=cli --cov=mcp --cov-report=xml --cov-report=term
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
file: ./coverage.xml
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: false
|