Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }})
Expand All @@ -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'
Expand Down
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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


Expand All @@ -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/
Expand Down
Loading