diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3cb7531..904ef74 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,13 @@ on: push: branches: [main] pull_request: + workflow_dispatch: # Allow manual runs jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false # Run all matrix combinations even if one fails matrix: python-version: ['3.10', '3.11', '3.12'] @@ -19,6 +21,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + cache: 'pip' - name: Install dependencies run: | @@ -27,7 +30,7 @@ jobs: - name: Run tests with coverage run: | - pytest tests/ -v --cov=src/document_analysis_mcp --cov-report=term --cov-report=xml + pytest tests/ -v --cov=src/document_analysis_mcp --cov-report=term --cov-report=xml --cov-fail-under=80 - name: Upload coverage to Codecov if: matrix.python-version == '3.12' @@ -38,6 +41,8 @@ jobs: lint: runs-on: ubuntu-latest + # Lint is non-blocking - failures are reported but don't fail the build + continue-on-error: true steps: - uses: actions/checkout@v4 @@ -45,6 +50,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.12' + cache: 'pip' - name: Install ruff run: pip install ruff