]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/blobdiff - Makefile
Add Makefile and test coverage
[perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git] / Makefile
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..1464886
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,32 @@
+test:
+       python test.py
+
+run:
+       python portfolio.py
+
+test_coverage_unit:
+       coverage run --source=. --omit=test.py 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=test.py test.py --onlyacceptance
+       coverage report -m
+
+test_coverage_acceptance_html: test_coverage_acceptance
+       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_all:
+       coverage run --source=. --omit=test.py test.py
+       coverage report -m
+
+test_coverage_all_html: test_coverage_all
+       coverage html
+       rm ~/hosts/www.immae.eu/htmlcov -rf && cp -r htmlcov ~/hosts/www.immae.eu
+       @echo "coverage in https://www.immae.eu/htmlcov"