⚡️ Migrate to uv #381
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: Example Project Tests | |
| on: | |
| push: | |
| branches: [development] | |
| pull_request: | |
| branches: [development] | |
| paths: | |
| - .github/** | |
| - src/** | |
| - tests/** | |
| - example_extension_project/** | |
| - example_replacement_project/** | |
| - pyproject.toml | |
| - requirements.txt | |
| env: | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| PYTHONWARNINGS: once | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, windows-2022] | |
| python-version: ["3.12", "3.14"] | |
| django-version: ["4.2", "5.2"] | |
| project: ["extension", "replacement"] | |
| exclude: | |
| # Django 4.2 only supports Python up to 3.12 | |
| - python-version: "3.14" | |
| django-version: "4.2" | |
| # Test Django 5.2 with latest Python only | |
| - python-version: "3.12" | |
| django-version: "5.2" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen --group dev --group examples --no-install-package django | |
| uv pip install "Django~=${{ matrix.django-version }}" | |
| - name: Python and Django versions | |
| run: | | |
| echo "Python ${{ matrix.python-version }} & Django ${{ matrix.django-version }}" | |
| uv run python --version | |
| echo "Django: $(uv run django-admin --version)" | |
| - name: Run tests | |
| working-directory: ./example_${{ matrix.project }}_project | |
| run: uv run python manage.py test |