From 2c6e9e766b9a2f6592a4c076bd81f1874d51526c Mon Sep 17 00:00:00 2001 From: realaravinth Date: Tue, 17 May 2022 20:27:45 +0530 Subject: [PATCH] feat: setup coverage generation for workspaces --- .gitignore | 1 + Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 57b20ad..e0e2a1c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .env **/target/ tmp +tarpaulin-report.html diff --git a/Makefile b/Makefile index fc1aed6..40cee79 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ clean: ## Clean all build artifacts and dependencies @cargo clean coverage: migrate ## Generate coverage report in HTML format - cargo tarpaulin -t 1200 --out Html --skip-clean --all-features --no-fail-fast #--workspace=database/db-sqlx-postgres,database/db-sqlx-sqlite,. + cargo tarpaulin -t 1200 --out Html --skip-clean --all-features --no-fail-fast --workspace=db/db-sqlx-sqlite,forge/gitea,federate/publiccodeyml,. check: ## Check for syntax errors on all workspaces cargo check --workspace --tests --all-features @@ -100,7 +100,7 @@ test: migrate ## Run tests # cargo test --no-fail-fast xml-test-coverage: migrate ## Generate cobertura.xml test coverage - cargo tarpaulin -t 1200 --out Xml --skip-clean --all-features --no-fail-fast #--workspace=database/db-sqlx-postgres,database/db-sqlx-sqlite,. + cargo tarpaulin -t 1200 --out XMl --skip-clean --all-features --no-fail-fast --workspace=db/db-sqlx-sqlite,forge/gitea,federate/publiccodeyml,. help: ## Prints help for targets with comments @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'