mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 00:54:42 +04:00
Initial commit.
This commit is contained in:
commit
7bb7f4a483
10 changed files with 329 additions and 0 deletions
40
Makefile
Normal file
40
Makefile
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
TEST_TARGETS =
|
||||
ITEST_TARGETS = -m integration
|
||||
UTEST_TARGETS = -m "not(integration)"
|
||||
|
||||
all: _tests
|
||||
|
||||
integration:
|
||||
$(eval TEST_TARGETS := $(ITEST_TARGETS))
|
||||
|
||||
unit:
|
||||
$(eval TEST_TARGETS := $(UTEST_TARGETS))
|
||||
|
||||
utests: test
|
||||
utest: 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)'
|
||||
|
||||
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
|
||||
rm -rf py_env
|
||||
virtualenv py_env
|
||||
bash -c 'source py_env/bin/activate && \
|
||||
pip install -r requirements.txt'
|
||||
|
||||
clean:
|
||||
rm -rf py_env
|
||||
Loading…
Add table
Add a link
Reference in a new issue