mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
chore(tools): add user friendly coverage make command
- add a command allowing to run tests and coverage in one go
This commit is contained in:
7
Makefile
7
Makefile
@@ -48,6 +48,13 @@ mypy_test:
|
||||
mypy_ci: mypy mypy_test
|
||||
.PHONY: mypy_ci
|
||||
|
||||
pytest_and_coverage: pytest coverage
|
||||
.PHONY: pytest_and_coverage
|
||||
|
||||
coverage:
|
||||
@if [[ "$$BB" == "" ]]; then BB=origin/main; fi && poetry run diff-cover coverage.xml --fail-under 100 --html-report coverage.html --compare-branch $$BB
|
||||
.PHONY: coverage
|
||||
|
||||
docs:
|
||||
cd docs && poetry run make html
|
||||
.PHONY: docs
|
||||
|
||||
@@ -6,9 +6,7 @@ set +e
|
||||
CURR_DIR=`dirname $0`
|
||||
|
||||
# Run diff-coverage
|
||||
poetry run diff-cover coverage.xml --fail-under 100 \
|
||||
--html-report coverage.html \
|
||||
--compare-branch origin/"$1" | tee diff-coverage.txt
|
||||
BB="origin/$1" make coverage | tee diff-coverage.txt
|
||||
|
||||
# Get exit code without closing the script
|
||||
TEST_EXIT_CODE="$?"
|
||||
|
||||
Reference in New Issue
Block a user