aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 00e18a3..3085503 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,11 @@ endif
8test: 8test:
9 python test.py 9 python test.py
10 10
11test_unit:
12 python test.py --onlyunit
13
11test_acceptance: 14test_acceptance:
12 python test_acceptance.py 15 python test.py --onlyacceptance
13 16
14run: 17run:
15 python portfolio.py 18 python portfolio.py
@@ -18,7 +21,7 @@ release_version = $(shell git describe --tags --always)
18release_file = trader_$(release_version).tar.gz 21release_file = trader_$(release_version).tar.gz
19folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader 22folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader
20 23
21coverage_omit = "tests/*.py,test.py,test_acceptance.py" 24coverage_omit = "tests/*.py,test.py"
22 25
23build_release: 26build_release:
24 git archive HEAD -o $(release_file) 27 git archive HEAD -o $(release_file)
@@ -29,17 +32,26 @@ build_release:
29 @sha256sum $(folder)/$(release_file) | cut -d' ' -f1 32 @sha256sum $(folder)/$(release_file) | cut -d' ' -f1
30 @echo "=================================" 33 @echo "================================="
31 34
32test_coverage_unit: 35test_coverage:
33 coverage run --source=. --omit="$(coverage_omit)" test.py 36 coverage run --source=. --omit="$(coverage_omit)" test.py
34 coverage report -m 37 coverage report -m
35 38
39test_coverage_html: test_coverage
40 coverage html
41 rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu
42 @echo "coverage in https://www.immae.eu/htmlcov"
43
44test_coverage_unit:
45 coverage run --source=. --omit="$(coverage_omit)" test.py --onlyunit
46 coverage report -m
47
36test_coverage_unit_html: test_coverage_unit 48test_coverage_unit_html: test_coverage_unit
37 coverage html 49 coverage html
38 rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu 50 rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu
39 @echo "coverage in https://www.immae.eu/htmlcov" 51 @echo "coverage in https://www.immae.eu/htmlcov"
40 52
41test_coverage_acceptance: 53test_coverage_acceptance:
42 coverage run --source=. --omit="$(coverage_omit)" test_acceptance.py 54 coverage run --source=. --omit="$(coverage_omit)" test.py --onlyacceptance
43 coverage report -m 55 coverage report -m
44 56
45test_coverage_acceptance_html: test_coverage_acceptance 57test_coverage_acceptance_html: test_coverage_acceptance