feat: setup coverage generation for workspaces

This commit is contained in:
Aravinth Manivannan 2022-05-17 20:27:45 +05:30
parent d0fd8166e3
commit 2c6e9e766b
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
.env .env
**/target/ **/target/
tmp tmp
tarpaulin-report.html

View file

@ -43,7 +43,7 @@ clean: ## Clean all build artifacts and dependencies
@cargo clean @cargo clean
coverage: migrate ## Generate coverage report in HTML format 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 check: ## Check for syntax errors on all workspaces
cargo check --workspace --tests --all-features cargo check --workspace --tests --all-features
@ -100,7 +100,7 @@ test: migrate ## Run tests
# cargo test --no-fail-fast # cargo test --no-fail-fast
xml-test-coverage: migrate ## Generate cobertura.xml test coverage 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 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}' @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'