chore: Migrate to uv+hatchling #165
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
| # Docs: | |
| # - https://docs.github.com/en/actions/guides/about-service-containers | |
| # - https://github.com/actions/example-services/blob/main/.github/workflows/mongodb-service.yml | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| Test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: | |
| - "3.9" | |
| - "3.10" | |
| - "3.11" | |
| - "3.12" | |
| - "3.13" | |
| - "pypy3.10" | |
| django: | |
| - "Django>=4.2,<4.3" | |
| - "Django>=5.0,<5.1" | |
| - "Django>=5.1,<5.2" | |
| exclude: | |
| - python: "3.9" | |
| django: "Django>=5.0,<5.1" | |
| - python: "3.9" | |
| django: "Django>=5.1,<5.2" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DJANGO: ${{ matrix.django }} | |
| services: | |
| mongodb: | |
| image: mongo | |
| ports: | |
| - 27017:27017 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python }} | |
| - name: Set up env | |
| run: | | |
| uv sync | |
| uv pip install -q "${{ matrix.django }}" | |
| - name: Run tests | |
| run: | | |
| uv run ruff . | |
| uv run ruff format --check . | |
| uv run python -m pytest |