You've already forked RekomenciBackend
chore: improved and fixed Justfile
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
[doc("Все команды")]
|
[doc("All commands")]
|
||||||
default:
|
default:
|
||||||
just --list --unsorted --list-heading $'Commands…\n'
|
just --list --unsorted --list-heading $'Commands…\n'
|
||||||
|
|
||||||
@@ -8,37 +8,15 @@ default:
|
|||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Docker")]
|
[group("Docker")]
|
||||||
[doc("Билд основного контейнера")]
|
[doc("Rebuild all images")]
|
||||||
docker-build-main:
|
build:
|
||||||
docker build -t template_project_deploy .
|
docker compose --profile migrations --profile tests --profile observability build
|
||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Docker")]
|
[group("Docker")]
|
||||||
[doc("Билд тестового контейнера")]
|
[doc("Compose start")]
|
||||||
docker-build-tests:
|
up:
|
||||||
docker build -t template_project_tests .
|
docker compose --profile migrations --profile observability up -d --remove-orphans --quiet-pull
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
[group("Docker")]
|
|
||||||
[doc("Билд миграционного контейнера")]
|
|
||||||
docker-build-migrations:
|
|
||||||
docker build -t template_project_migrations .
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
[group("Docker")]
|
|
||||||
[doc("Билд всех контейнеров")]
|
|
||||||
docker-build-all:
|
|
||||||
just docker-build-main
|
|
||||||
just docker-build-tests
|
|
||||||
just docker-build-migrations
|
|
||||||
|
|
||||||
[no-cd]
|
|
||||||
[group("Docker")]
|
|
||||||
[doc("Запуск композа")]
|
|
||||||
docker-up:
|
|
||||||
just docker-build-all
|
|
||||||
|
|
||||||
docker compose up web_api -d
|
|
||||||
|
|
||||||
# =========
|
# =========
|
||||||
# > Tests
|
# > Tests
|
||||||
@@ -46,11 +24,11 @@ docker-up:
|
|||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Tests")]
|
[group("Tests")]
|
||||||
[doc("Запуск тестов")]
|
[doc("Tests run")]
|
||||||
tests-run:
|
tests:
|
||||||
just docker-up
|
just up
|
||||||
|
|
||||||
docker compose up tests --abort-on-container-exit --remove-orphans
|
docker compose --profile migrations --profile tests up tests --remove-orphans --abort-on-container-exit
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
# =========
|
# =========
|
||||||
@@ -59,25 +37,30 @@ tests-run:
|
|||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Lints")]
|
[group("Lints")]
|
||||||
[doc("Запуск всех линтов")]
|
[doc("Linters run")]
|
||||||
lints-run:
|
lint:
|
||||||
ruff check
|
ruff check
|
||||||
mypy
|
mypy
|
||||||
codespell src tests
|
codespell src tests
|
||||||
bandit src tests
|
bandit src tests
|
||||||
|
|
||||||
|
[no-cd]
|
||||||
|
[group("Formatters run")]
|
||||||
|
format:
|
||||||
|
ruff format
|
||||||
|
|
||||||
# =========
|
# =========
|
||||||
# > Migrations
|
# > Migrations
|
||||||
# =========
|
# =========
|
||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Migrations")]
|
[group("Migrations")]
|
||||||
[doc("Запуск миграции")]
|
[doc("Run alembic upgrade")]
|
||||||
migrations-run tag="head":
|
migrations-run tag="head":
|
||||||
CONFIGURATION_PATH=config.toml alembic upgrade {{tag}}
|
CONFIGURATION_PATH=config.toml alembic upgrade {{tag}}
|
||||||
|
|
||||||
[no-cd]
|
[no-cd]
|
||||||
[group("Migrations")]
|
[group("Migrations")]
|
||||||
[doc('Создание миграции')]
|
[doc("Create new alembic revision")]
|
||||||
migrations-make message="":
|
migrations-make message="":
|
||||||
CONFIGURATION_PATH=config.toml alembic revision --autogenerate -m "{{message}}"
|
CONFIGURATION_PATH=config.toml alembic revision --autogenerate -m "{{message}}"
|
||||||
|
|||||||
Reference in New Issue
Block a user