feat: initialize Task 3 - Enhanced Semantic Search Capabilities #16
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: Setup pixi | |
| uses: prefix-dev/[email protected] | |
| with: | |
| pixi-version: v0.49.0 | |
| cache: true | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git | |
| - name: Install dependencies | |
| run: | | |
| pixi install --locked | |
| - name: Run tests with coverage (HTML, XML, JSON, Markdown) | |
| run: | | |
| pixi run pytest tests/ --cov=src/uckn --cov-report=html --cov-report=xml --cov-report=json --cov-report=term --cov-report=term-missing --json-report --json-report-file=pytest-report.json --html=pytest-report.html --self-contained-html | |
| pixi run 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 | |
| pixi run 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: | | |
| pixi run quality-gate |