matrix-ops-bot/Makefile

36 lines
719 B
Makefile
Raw Normal View History

POETRY ?= poetry run
SRC := ops_bot
TESTS := tests
SHELL := $(shell which bash)
APP_VERSION := $(shell git rev-parse --short HEAD)
DOCKER ?= docker
docker-build:
2023-11-07 15:38:19 +01:00
DOCKER_BUILDKIT=1 $(DOCKER) build -f Dockerfile \
--build-arg=$(APP_VERSION) \
-t matrix-ops-bot:latest \
.
fmt:
$(POETRY) black $(SRC)
$(POETRY) black $(TESTS)
$(POETRY) isort --profile black $(SRC)
$(POETRY) isort --profile black $(TESTS)
lint:
$(POETRY) flake8 $(SRC)
$(POETRY) bandit --silent --recursive $(SRC)
types:
$(POETRY) mypy $(SRC)
test:
2022-07-22 12:59:55 +00:00
$(POETRY) pytest $(TESTS)
2022-11-30 15:40:38 +00:00
freeze:
2022-12-01 17:00:28 +00:00
poetry export --without dev --format=requirements.txt --output requirements.frozen.txt
check:
$(MAKE) fmt
$(MAKE) lint
$(MAKE) types
$(MAKE) test