Fetch Latest Main Branch Updates #36
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Tests | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| - develop | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| test: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ "3.13"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system -e . | |
| uv pip install --system pytest pytest-asyncio pytest-cov pytest-mock | |
| - name: Run unit tests (no external dependencies) | |
| run: | | |
| pytest tests/test_mcp_*.py -v --tb=short --color=yes -m "not integration" | |
| continue-on-error: false | |
| - name: Run tests with coverage | |
| run: | | |
| pytest tests/test_mcp_*.py --cov=mcp_tools --cov-report=term --cov-report=xml -m "not integration" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| if: matrix.python-version == '3.13' | |
| lint: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install black isort ruff | |
| - name: Run black (format check) | |
| run: black --check --diff . | |
| continue-on-error: true | |
| - name: Run isort (import check) | |
| run: isort --check-only --diff . | |
| continue-on-error: true | |
| - name: Run ruff (linting) | |
| run: ruff check . | |
| continue-on-error: true | |
| test-summary: | |
| name: Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test, lint] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| if [ "${{ needs.test.result }}" != "success" ]; then | |
| echo "❌ Tests failed!" | |
| exit 1 | |
| fi | |
| echo "✅ All tests passed!" | |
| - name: Check lint results | |
| run: | | |
| if [ "${{ needs.lint.result }}" != "success" ]; then | |
| echo "⚠️ Linting has warnings (but not blocking)" | |
| else | |
| echo "✅ Linting passed!" | |
| fi |