diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1736cb3..2acf200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,9 +30,9 @@ jobs: django-version: - "6.0" extras: - - "test" - - "test,sentry" - - "test,redis" + - "" # We try a run without any extras + - "--extra sentry" + - "--extra redis" services: redis: image: redis @@ -47,9 +47,9 @@ jobs: - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - - run: python -m pip install .[${{ matrix.extras }}] - - run: python -m pip install django~=${{ matrix.django-version }}.0 - - run: python -m pytest + - name: Install uv + uses: astral-sh/setup-uv@v7 + - run: uv run ${{ matrix.extras }} --with django~=${{ matrix.django-version }}.0 pytest - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 183802e..12864f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,11 +37,6 @@ requires-python = ">=3.12" dependencies = ["apscheduler", "django>=6.0"] [project.optional-dependencies] -test = [ - "pytest", - "pytest-cov", - "pytest-django", -] sentry = ["sentry-sdk"] redis = ["redis"] @@ -93,3 +88,13 @@ force-wrap-aliases = true [tool.ruff.lint.pydocstyle] convention = "pep257" + +[dependency-groups] +dev = [ + { include-group = "test" }, +] +test = [ + "pytest", + "pytest-cov", + "pytest-django", +]