chore: refactor test (coverage and frontend) subroutines in Makefile

This commit is contained in:
Aravinth Manivannan 2023-06-30 07:55:53 +05:30
parent 56dba7b77f
commit 99db889867
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -92,10 +92,6 @@ clean: ## Delete build artifacts
@yarn cache clean @yarn cache clean
@-rm $(CLEAN_UP) @-rm $(CLEAN_UP)
coverage: migrate ## Generate code coverage report in HTML format
$(call cache_bust)
cargo tarpaulin -t 1200 --out Html
doc: ## Generate documentation doc: ## Generate documentation
#yarn doc #yarn doc
cargo doc --no-deps --workspace --all-features cargo doc --no-deps --workspace --all-features
@ -175,19 +171,23 @@ db.sqlx.offline: ## prepare sqlx offline data
--database-url=${MARIA_DATABASE_URL} -- \ --database-url=${MARIA_DATABASE_URL} -- \
--all-features --all-features
test.frontend: ## Run frontend tests
$(call test_frontend)
test: frontend ## Run all available tests test: frontend ## Run all available tests
$(call test_frontend) $(call test_frontend)
$(call cache_bust) $(call cache_bust)
$(call test_db_sqlx_postgres) $(call test_db_sqlx_postgres)
$(call test_db_sqlx_maria) $(call test_db_sqlx_maria)
$(call test_core) $(call test_core)
cargo test --no-fail-fast
# ./scripts/tests.sh # ./scripts/tests.sh
test.cov.html: migrate ## Generate code coverage report in HTML format
$(call cache_bust)
cargo tarpaulin -t 1200 --out Html
test.cov.xml: migrate ## Generate code coverage report in XML format
$(call cache_bust)
cargo tarpaulin -t 1200 --out Xml
test.core: ## Run all core tests test.core: ## Run all core tests
$(call test_core) $(call test_core)
@ -201,13 +201,11 @@ test.db.pg: ## Run Postgres database driver tests
test.db.maria: ## Run Maria database driver tests test.db.maria: ## Run Maria database driver tests
$(call test_db_sqlx_maria) $(call test_db_sqlx_maria)
test.frontend: ## Run frontend tests
$(call test_frontend)
test.integration: ## run integration tests with nightwatch.js test.integration: ## run integration tests with nightwatch.js
./scripts/integration.sh ./scripts/integration.sh
xml-test-coverage: migrate ## Generate code coverage report in XML format
$(call cache_bust)
cargo tarpaulin -t 1200 --out Xml
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}'