From 846d08392b669719250690a614566703773741ee Mon Sep 17 00:00:00 2001 From: Sushil Tiwari Date: Thu, 16 Apr 2026 23:31:59 +0545 Subject: [PATCH] fix(ci): Use different python and django versions --- .github/workflows/ci.yaml | 22 ++++++++----------- .../commands/create_initial_users.py | 3 ++- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a982ba4..a023b54 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -55,13 +55,9 @@ jobs: - python-version: "3.12" django-version: "5.2" - - python-version: "3.13" + - python-version: "3.13.2" django-version: "6.0" - env: - TEST_PYTHON_VERSION: ${{ matrix.python-version }} - TEST_DJANGO_VERSION: ${{ matrix.django-version }} - steps: - uses: actions/checkout@main @@ -71,16 +67,16 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - - uses: astral-sh/setup-uv@v5 + - uses: astral-sh/setup-uv@v7 with: + python-version: ${{ matrix.python-version }} enable-cache: true - - name: Install package and test deps - run: | - uv sync --all-groups --all-extras - - - name: Install Django ${{ matrix.django-version }} - run: uv pip install "django~=${{ matrix.django-version }}" + - name: Install dependencies + run: uv sync --all-groups --all-extras - name: Run tests - run: uv run pytest tests/ -v --tb=short + run: | + uv run \ + --with "django~=${{ matrix.django-version }}" \ + pytest tests/ -v --tb=short diff --git a/src/banjo_utils/management/commands/create_initial_users.py b/src/banjo_utils/management/commands/create_initial_users.py index 448753b..a9232ff 100644 --- a/src/banjo_utils/management/commands/create_initial_users.py +++ b/src/banjo_utils/management/commands/create_initial_users.py @@ -3,11 +3,12 @@ import json import pathlib import typing -from typing import Any, override +from typing import Any from django.contrib.auth import get_user_model from django.contrib.auth.hashers import identify_hasher from django.core.management.base import BaseCommand, CommandError +from typing_extensions import override if typing.TYPE_CHECKING: from django.core.management.base import CommandParser