-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
22 lines (15 loc) · 832 Bytes
/
Makefile
File metadata and controls
22 lines (15 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
.PHONY: autoformat tests
autoformat: build-dev
git ls-files | grep -E '\.py$$' | xargs docker run --rm -t -v $$(pwd):/code/BattlePyEngine kyokley/battlepyengine /venv/bin/isort
git ls-files | grep -E '\.py$$' | xargs docker run --rm -t -v $$(pwd):/code/BattlePyEngine kyokley/battlepyengine /venv/bin/black -S
tests: pytest bandit
pytest: build-dev
docker run --rm -t -v $$(pwd):/code/BattlePyEngine kyokley/battlepyengine /venv/bin/pytest
bandit: build-dev
git ls-files | grep -E '\.py$$' | xargs docker run --rm -t -v $$(pwd):/code/BattlePyEngine kyokley/battlepyengine /venv/bin/black -S --check
build:
docker build -t kyokley/battlepyengine --target=prod .
build-dev:
docker build -t kyokley/battlepyengine --target=dev .
shell:
docker run --rm -it -v $$(pwd):/code/BattlePyEngine kyokley/battlepyengine /bin/bash