From: Ismaƫl Bouya Date: Fri, 20 Apr 2018 18:09:45 +0000 (+0200) Subject: Add test actions to makefile X-Git-Tag: v1.3~1^2^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=b61b370d09179c91d8bfe0c06c0023ebecd62b54;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FCryptoportfolio%2FTrader.git Add test actions to makefile --- diff --git a/Makefile b/Makefile index 00e18a3..3085503 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,11 @@ endif test: python test.py +test_unit: + python test.py --onlyunit + test_acceptance: - python test_acceptance.py + python test.py --onlyacceptance run: python portfolio.py @@ -18,7 +21,7 @@ release_version = $(shell git describe --tags --always) release_file = trader_$(release_version).tar.gz folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader -coverage_omit = "tests/*.py,test.py,test_acceptance.py" +coverage_omit = "tests/*.py,test.py" build_release: git archive HEAD -o $(release_file) @@ -29,17 +32,26 @@ build_release: @sha256sum $(folder)/$(release_file) | cut -d' ' -f1 @echo "=================================" -test_coverage_unit: +test_coverage: coverage run --source=. --omit="$(coverage_omit)" test.py coverage report -m +test_coverage_html: test_coverage + coverage html + rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu + @echo "coverage in https://www.immae.eu/htmlcov" + +test_coverage_unit: + coverage run --source=. --omit="$(coverage_omit)" test.py --onlyunit + coverage report -m + test_coverage_unit_html: test_coverage_unit coverage html rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu @echo "coverage in https://www.immae.eu/htmlcov" test_coverage_acceptance: - coverage run --source=. --omit="$(coverage_omit)" test_acceptance.py + coverage run --source=. --omit="$(coverage_omit)" test.py --onlyacceptance coverage report -m test_coverage_acceptance_html: test_coverage_acceptance