fix: resolve pixi environment configuration warnings #217
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: | |
| ENVIRONMENT: ci | |
| PYTHONUNBUFFERED: 1 | |
| PIXI_ENV: ci | |
| UCKN_DISABLE_TORCH: "1" | |
| HF_HUB_DISABLE_PROGRESS_BARS: "1" | |
| HF_HUB_DISABLE_TELEMETRY: "1" | |
| PYTHON_VERSION: "3.12" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup pixi | |
| uses: prefix-dev/setup-pixi@v0.8.1 | |
| with: | |
| pixi-version: v0.50.2 | |
| cache: true | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git | |
| - name: Install dependencies (pixi) | |
| run: pixi install | |
| - name: Install dev dependencies | |
| run: pixi run -e dev dev | |
| - name: Run tests with coverage (HTML, XML, JSON, Markdown) | |
| run: | | |
| pixi run -e quality test-cov | |
| pixi run -e quality 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 -e quality-extended 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 -e quality quality-gate |