chore(prek): add uv-prek-commit hooks #27
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| jobs: | |
| typos: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 # v5 | |
| - uses: crate-ci/typos@master | |
| test: | |
| name: Coverage | |
| # runs-on: ${{ matrix.os }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| # group: test-coverage-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.os }} | |
| group: coverage-${{ github.ref }}-${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| # os: [ubuntu-latest, windows-latest, macos-latest] | |
| # pydantic-version: ["v1", "v2"] | |
| env: | |
| # OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python-version }} | |
| UV_NO_SYNC: 1 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| version: "latest" | |
| - name: Install Dependencies for test group | |
| run: uv sync --no-dev --locked | |
| - name: Run Pytest | |
| run: uv run poe test | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| env_vars: PYTHON | |
| use_oidc: true | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| env_vars: PYTHON | |
| use_oidc: true |