diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0da78d9..c546a69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,11 +21,11 @@ jobs: enable-cache: true python-version: "3.12" - - name: Install dependencies - run: uv sync --extra dev + - name: Install tox + run: uv tool install tox --with tox-uv - name: Run linting - run: make lint + run: tox -e lint test: name: Test (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) @@ -46,13 +46,14 @@ jobs: enable-cache: true python-version: "${{ matrix.python-version }}" - - name: Install dependencies - run: | - uv lock --upgrade-package "django==${{ matrix.django-version }}.*" - uv sync --extra test + - name: Pin Django version + run: uv lock --upgrade-package "django==${{ matrix.django-version }}.*" + + - name: Install tox + run: uv tool install tox --with tox-uv - name: Run tests with coverage - run: make test-with-coverage + run: tox -e test - name: Upload coverage to Codecov if: matrix.django-version == '4.2' diff --git a/Makefile b/Makefile index ac18b18..779fa7a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help requirements upgrade lint format test test-with-coverage docs clean +.PHONY: help requirements upgrade lint format test docs clean .PHONY: extract_translations @@ -15,26 +15,23 @@ help: ## Show this help message requirements: ## Sync dev dependencies uv sync + uv tool install tox --with tox-uv upgrade: ## Upgrade python dependencies uv lock --upgrade lint: ## Run linting checks - uv run ruff check . - uv run ruff format --check . + tox -e lint format: ## Auto-fix formatting issues uv run ruff check --fix . uv run ruff format . -test: ## Run tests with pytest - uv run pytest - -test-with-coverage: ## Run tests with coverage reporting - uv run pytest --cov=$(SRC_DIRECTORY) --cov-report=xml +test: ## Run tests with coverage reporting + tox -e test docs: ## Build documentation - $(MAKE) -C docs html + tox -e docs clean: ## Clean build artifacts rm -rf build/