diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -8,8 +8,11 @@ endif | |||
8 | test: | 8 | test: |
9 | python test.py | 9 | python test.py |
10 | 10 | ||
11 | test_unit: | ||
12 | python test.py --onlyunit | ||
13 | |||
11 | test_acceptance: | 14 | test_acceptance: |
12 | python test_acceptance.py | 15 | python test.py --onlyacceptance |
13 | 16 | ||
14 | run: | 17 | run: |
15 | python portfolio.py | 18 | python portfolio.py |
@@ -18,7 +21,7 @@ release_version = $(shell git describe --tags --always) | |||
18 | release_file = trader_$(release_version).tar.gz | 21 | release_file = trader_$(release_version).tar.gz |
19 | folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader | 22 | folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader |
20 | 23 | ||
21 | coverage_omit = "tests/*.py,test.py,test_acceptance.py" | 24 | coverage_omit = "tests/*.py,test.py" |
22 | 25 | ||
23 | build_release: | 26 | build_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 | ||
32 | test_coverage_unit: | 35 | test_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 | ||
39 | test_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 | |||
44 | test_coverage_unit: | ||
45 | coverage run --source=. --omit="$(coverage_omit)" test.py --onlyunit | ||
46 | coverage report -m | ||
47 | |||
36 | test_coverage_unit_html: test_coverage_unit | 48 | test_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 | ||
41 | test_coverage_acceptance: | 53 | test_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 | ||
45 | test_coverage_acceptance_html: test_coverage_acceptance | 57 | test_coverage_acceptance_html: test_coverage_acceptance |