Spaces:
Sleeping
Sleeping
| name: CI — Tests & Lint | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test-core: | |
| name: "Core Tests (Python ${{ matrix.python-version }})" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| - name: Install core dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-core.txt | |
| pip install -r requirements-dev.txt | |
| - name: Run tests with coverage | |
| run: | | |
| python -m pytest tests/ \ | |
| --tb=short \ | |
| -q \ | |
| --cov=modules \ | |
| --cov-report=term-missing \ | |
| --cov-report=xml:coverage.xml \ | |
| --ignore=tests/test_integration.py \ | |
| --ignore=tests/test_performance.py \ | |
| -x | |
| - name: Upload coverage report | |
| if: matrix.python-version == '3.11' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage.xml | |
| test-integration: | |
| name: "Integration Tests" | |
| runs-on: ubuntu-latest | |
| needs: test-core | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install all dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-full.txt | |
| pip install -r requirements-dev.txt | |
| - name: Run integration tests | |
| run: | | |
| python -m pytest tests/test_integration.py \ | |
| --tb=short \ | |
| -q \ | |
| --timeout=120 | |
| lint: | |
| name: "Lint & Format Check" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install lint tools | |
| run: | | |
| pip install flake8 black isort | |
| - name: Run flake8 | |
| run: | | |
| flake8 modules/ \ | |
| --count \ | |
| --select=E9,F63,F7,F82 \ | |
| --show-source \ | |
| --statistics \ | |
| --max-line-length=120 | |
| - name: Check black formatting | |
| run: | | |
| black --check --line-length=120 modules/ 2>&1 || true | |