feat: initialize Task 3 - Enhanced Semantic Search Capabilities #6
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: Quality Metrics & Coverage | |
| on: | |
| push: | |
| branches: [main, development] | |
| pull_request: | |
| branches: [main, development] | |
| jobs: | |
| test-and-coverage: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| env: | |
| PYTHON_VERSION: "3.10" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git | |
| - name: Install Poetry (if needed) | |
| run: pip install poetry | |
| - name: Install dependencies | |
| run: | | |
| pip install -e .[dev,ml] | |
| - name: Run tests with coverage (HTML, XML, JSON, Markdown) | |
| run: | | |
| coverage run -m pytest --json-report --json-report-file=pytest-report.json --html=pytest-report.html --self-contained-html | |
| coverage html | |
| coverage xml | |
| coverage json | |
| coverage report | |
| coverage markdown | |
| - name: Upload coverage artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-reports | |
| path: | | |
| htmlcov/ | |
| coverage.xml | |
| coverage.json | |
| coverage.md | |
| .coverage* | |
| pytest-report.json | |
| pytest-report.html | |
| - name: diff-cover (PR only) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git fetch origin main:refs/remotes/origin/main | |
| diff-cover coverage.xml --compare-branch=origin/main --fail-under=90 --html-report diffcover.html --markdown-report diffcover.md --json-report diffcover.json | |
| - name: Upload diff-cover artifacts | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: diffcover-reports | |
| path: | | |
| diffcover.html | |
| diffcover.md | |
| diffcover.json | |
| - name: Comment PR with coverage summary | |
| if: github.event_name == 'pull_request' | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| path: coverage.md | |
| - name: Quality Gate | |
| run: | | |
| python tests/quality_metrics/quality_dashboard.py --check-gate --fail-under=90 |