-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (33 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
DOCKER_NAME ?= tfrlrl
DOCKER_DEVELOPMENT_NAME ?= tfrlrl_dev
DOCKER_TAG ?= latest
install:
python -m pip install --upgrade pip
poetry install --without dev
install-dev:
python -m pip install --upgrade pip
poetry install
check-style:
poetry run flake8 src/tfrlrl tests
isort:
poetry run isort .
test:
poetry run pytest --random-order tests/
test-coverage:
poetry run pytest --random-order --cov=tfrlrl --cov-config=setup.cfg tests/
docker-build:
docker build --tag $(DOCKER_NAME):$(DOCKER_TAG) --target production --file docker/Dockerfile .
docker-build-dev:
docker build --tag $(DOCKER_DEVELOPMENT_NAME):$(DOCKER_TAG) --target development --file docker/Dockerfile .
docker-check-style: docker-build-dev
docker run $(DOCKER_DEVELOPMENT_NAME):$(DOCKER_TAG) /bin/bash -c 'make check-style'
docker-test: docker-build-dev
docker run $(DOCKER_DEVELOPMENT_NAME):$(DOCKER_TAG) /bin/bash -c 'make test'
docker-test-coverage: docker-build-dev
docker run $(DOCKER_DEVELOPMENT_NAME):$(DOCKER_TAG) /bin/bash -c 'make test-coverage'
bump_major:
poetry run bumpversion major
bump_minor:
poetry run bumpversion minor
bump_patch:
poetry run bumpversion patch