Skip to content
Merged
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
18 changes: 12 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
version: 2
updates:
# Экосистема uv покрывает и pyproject.toml, и uv.lock. Отдельный блок pip на
# том же каталоге давал бы вторую пачку PR на те же зависимости.
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 1
labels: ["dependencies", "automated"]
commit-message:
prefix: "chore"
groups:
all-uv-dependencies:
patterns:
- "*"
uv-all:
patterns: ["*"]

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 1
labels: ["dependencies", "automated"]
commit-message:
prefix: "chore"
groups:
all-github-actions-dependencies:
patterns:
- "*"
github-actions-all:
patterns: ["*"]
24 changes: 24 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR Title

# Заголовок PR обязан быть conventional commit: при squash-мерже он становится
# сообщением коммита, а по нему release-please определяет, какой разряд версии
# поднять. Проверка отдельных коммитов ветки намеренно не делается, чтобы не
# мешать работе внутри PR.
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened

permissions:
pull-requests: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 16 additions & 17 deletions .github/workflows/pyci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
name: Python CI

on:
- push
- pull_request
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install uv
make setup
# setup-python не нужен: версию питона держит .python-version, и uv сам
# ставит её при первом `uv sync`. Единый источник версии, поэтому раннер
# и образ кита не могут разойтись.
- uses: astral-sh/setup-uv@v10.0.0

- name: Run the linter
run: |
make lint

- name: Run the tests
run: |
make test
- name: Install
run: make install
- name: Run linter
run: make lint
- name: Run tests
run: make test
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.14
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ MANAGE := uv run python manage.py

.PHONY: test
test:
uv run pytest
@uv run pytest

.PHONY: setup
setup: db-clean install migrate
Expand All @@ -25,4 +25,7 @@ shell:

.PHONY: lint
lint:
uv run ruff check python_django_orm_blog
@uv run ruff check .

.PHONY: check
check: install lint test
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion python_django_orm_blog/blog/tests.py → blog/tests.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import django.db
import pytest

from python_django_orm_blog.blog import models
from blog import models


@pytest.mark.django_db
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
description = "A simple Django project that implements a simple blog."
authors = [{name = "Hexlet Team", email = "<info@hexlet.io>"}]
readme = "README.md"
requires-python = ">=3.12"
requires-python = ">=3.14"
dependencies = [
"django>=6.1",
]
Expand Down
2 changes: 1 addition & 1 deletion python_django_orm_blog/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

INSTALLED_APPS = [
'django_extensions',
'python_django_orm_blog.blog',
'blog',
]

MIDDLEWARE = [
Expand Down
8 changes: 1 addition & 7 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.