fix: updated hooks and ci #33
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: Python Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/python/**' | |
| - '.github/workflows/python-test.yml' | |
| pull_request: | |
| paths: | |
| - 'packages/python/**' | |
| - '.github/workflows/python-test.yml' | |
| defaults: | |
| run: | |
| working-directory: packages/python | |
| jobs: | |
| test: | |
| name: Test Suite (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --all-extras | |
| - name: Run tests | |
| run: uv run pytest tests/ -v --tb=short | |
| - name: Generate coverage report | |
| if: matrix.python-version == '3.11' | |
| run: uv run pytest tests/ --cov=src/epaper_dithering --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./packages/python/coverage.xml | |
| fail_ci_if_error: false | |
| flags: python |