-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
51 lines (36 loc) · 1.26 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
48
49
50
51
.PHONY: all format lint test tests test_watch integration_tests docker_tests help extended_tests
# Default target executed when no arguments are given to make.
all: help
# Define a variable for the test file path.
TEST_FILE ?= tests/unit/
test:
poetry run pytest $(TEST_FILE)
tests:
poetry run pytest $(TEST_FILE)
test_watch:
poetry run ptw --ignore ./tests/integration . -- ./tests/unit
extended_tests:
poetry run pytest --only-extended ./tests/unit
integration_tests:
poetry run pytest tests/integration
# Linting & Formatting
install:
poetry install --with quality,tests
poetry run pre-commit install
format:
poetry run pre-commit run --all-files
# Documentation
html:
make.bat html
help:
@echo '===================='
@echo '-- DOCUMENTATION ---'
@echo '--------------------'
@echo 'install - install dependencies'
@echo 'format - run code formatters'
@echo 'test - run unit tests'
@echo 'tests - run unit tests'
@echo 'test TEST_FILE=<test_file> - run all tests in file'
@echo 'test_watch - run unit tests in watch mode'
@echo 'extended_tests - run extended tests'
@echo 'integration_tests - run integration tests'