mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Refactor makefile
This commit is contained in:
parent
ba17fe6135
commit
e1af47b1aa
1 changed files with 15 additions and 10 deletions
25
Makefile
25
Makefile
|
|
@ -10,6 +10,16 @@ export COVERAGE := $(CI)
|
||||||
export DETERMINISTIC_TESTS := false
|
export DETERMINISTIC_TESTS := false
|
||||||
|
|
||||||
PYTEST_ARGS =
|
PYTEST_ARGS =
|
||||||
|
TEST_EXTRA_PACKAGES =
|
||||||
|
ifeq ($(COVERAGE), true)
|
||||||
|
TEST_EXTRA_PACKAGES += pytest-cov
|
||||||
|
PYTEST_ARGS += --cov-config .coveragerc --cov vdirsyncer
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CI), true)
|
||||||
|
TEST_EXTRA_PACKAGES += codecov
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(DAV_SERVER), skip)
|
ifneq ($(DAV_SERVER), skip)
|
||||||
PYTEST_ARGS += tests/storage/dav
|
PYTEST_ARGS += tests/storage/dav
|
||||||
endif
|
endif
|
||||||
|
|
@ -37,15 +47,10 @@ install-test: install-servers
|
||||||
git+https://github.com/DRMacIver/hypothesis \
|
git+https://github.com/DRMacIver/hypothesis \
|
||||||
git+https://github.com/pytest-dev/pytest; \
|
git+https://github.com/pytest-dev/pytest; \
|
||||||
fi
|
fi
|
||||||
[ $(CI) != "true" ] || pip install pytest-cov codecov
|
[ -z "$(TEST_EXTRA_PACKAGES)" ] || pip install $(TEST_EXTRA_PACKAGES)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
set -e; \
|
py.test $(PYTEST_ARGS)
|
||||||
if [ "$(COVERAGE)" = "true" ]; then \
|
|
||||||
py.test --cov-config .coveragerc --cov vdirsyncer $(PYTEST_ARGS); \
|
|
||||||
else \
|
|
||||||
py.test $(PYTEST_ARGS); \
|
|
||||||
fi
|
|
||||||
|
|
||||||
after-test:
|
after-test:
|
||||||
[ "$(CI)" != "true" ] || codecov
|
[ "$(CI)" != "true" ] || codecov
|
||||||
|
|
@ -85,16 +90,16 @@ release:
|
||||||
python setup.py sdist bdist_wheel upload
|
python setup.py sdist bdist_wheel upload
|
||||||
|
|
||||||
install-dev:
|
install-dev:
|
||||||
set -xe && if [ "$$REMOTESTORAGE_SERVER" != "skip" ]; then \
|
set -xe && if [ "$(REMOTESTORAGE_SERVER)" != "skip" ]; then \
|
||||||
pip install -e .[remotestorage]; \
|
pip install -e .[remotestorage]; \
|
||||||
else \
|
else \
|
||||||
pip install -e .; \
|
pip install -e .; \
|
||||||
fi
|
fi
|
||||||
set -xe && if [ "$$REQUIREMENTS" = "devel" ]; then \
|
set -xe && if [ "$(REQUIREMENTS)" = "devel" ]; then \
|
||||||
pip install -U --force-reinstall \
|
pip install -U --force-reinstall \
|
||||||
git+https://github.com/mitsuhiko/click \
|
git+https://github.com/mitsuhiko/click \
|
||||||
git+https://github.com/kennethreitz/requests; \
|
git+https://github.com/kennethreitz/requests; \
|
||||||
elif [ "$$REQUIREMENTS" = "minimal" ]; then \
|
elif [ "$(REQUIREMENTS)" = "minimal" ]; then \
|
||||||
pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \
|
pip install -U --force-reinstall $$(python setup.py --quiet minimal_requirements); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue