mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Better project structure
This commit is contained in:
parent
f31f092f9b
commit
1746a97e24
52 changed files with 221 additions and 189 deletions
48
Makefile
48
Makefile
|
|
@ -1,41 +1,17 @@
|
|||
.PHONY: all
|
||||
all: venv test
|
||||
|
||||
TEST_TARGETS =
|
||||
ITEST_TARGETS = -m integration
|
||||
UTEST_TARGETS = -m "not(integration)"
|
||||
.PHONY: venv
|
||||
venv:
|
||||
tox -e venv
|
||||
|
||||
DEBUG=
|
||||
|
||||
all: _tests
|
||||
|
||||
integration:
|
||||
$(eval TEST_TARGETS := $(ITEST_TARGETS))
|
||||
|
||||
unit:
|
||||
$(eval TEST_TARGETS := $(UTEST_TARGETS))
|
||||
|
||||
utests: test
|
||||
utest: test
|
||||
.PHONY: tests test
|
||||
tests: test
|
||||
test: unit _tests
|
||||
itests: itest
|
||||
itest: integration _tests
|
||||
|
||||
_tests: py_env
|
||||
bash -c 'source py_env/bin/activate && py.test tests $(TEST_TARGETS) $(DEBUG)'
|
||||
|
||||
ucoverage: unit coverage
|
||||
icoverage: integration coverage
|
||||
|
||||
coverage: py_env
|
||||
bash -c 'source py_env/bin/activate && \
|
||||
coverage erase && \
|
||||
coverage run `which py.test` tests $(TEST_TARGETS) && \
|
||||
coverage report -m'
|
||||
|
||||
py_env: requirements.txt setup.py
|
||||
rm -rf py_env
|
||||
virtualenv py_env
|
||||
bash -c 'source py_env/bin/activate && pip install -r requirements.txt'
|
||||
test:
|
||||
tox
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf py_env
|
||||
find . -iname '*.pyc' | xargs rm -f
|
||||
rm -rf .tox
|
||||
rm -rf ./venv-*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue