-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
38 lines (28 loc) · 798 Bytes
/
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
.PHONY: venv test venv_clean
BIN = .venv/bin
PY = ${BIN}/python -B
PIP_INSTALL = ${BIN}/pip install
PYTEST = ${PY} -m pytest
venv: .venv/touchfile
# touching a file makes it possible to run this rule only when requirements.txt changes
.venv/touchfile: requirements.txt requirements_test.txt
[ -d .venv ] || python3 -m venv .venv
${PIP_INSTALL} --upgrade pip wheel
${PIP_INSTALL} -r requirements.txt
${PIP_INSTALL} -r requirements_test.txt
touch .venv/touchfile
venv_clean:
[ -d .venv ] && rm -rf .venv
test: venv
${PYTEST} tests.py $(args)
# run tests and drop into a console on the first fail
test_debug: venv
${PYTEST} tests.py -x --pdb $(args)
build:
docker build -t r_soccer_goals .
run: venv
${PY} main.py
format: venv
${BIN}/ruff format .
lint: venv
${BIN}/ruff check .