From 7bc358b446676086f7294b88044ad55d400f93e5 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Fri, 9 Dec 2022 14:13:55 +0530 Subject: [PATCH] feat: setup CI --- .woodpecker.yml | 6 ++++++ Makefile | 28 ++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 Makefile diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..098d4f6 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,6 @@ +pipeline: + backend: + image: rust + commands: + - make check + - make lint diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a487ef0 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +default: ## Build app in debug mode + cargo build + +check: ## Check for syntax errors on all workspaces + cargo check --workspace --tests --all-features + +clean: ## Delete build artifacts + @cargo clean + +coverage: ## Generate code coverage report in HTML format + cargo tarpaulin -t 1200 --out Html + +doc: ## Generate documentation + #yarn doc + cargo doc --no-deps --workspace --all-features + +env: ## Setup development environtment + cargo fetch + +lint: ## Lint codebase + cargo fmt -v --all -- --emit files + cargo clippy --workspace --tests --all-features + +xml-test-coverage: ## Generate code coverage report in XML format + cargo tarpaulin -t 1200 --out Xml + +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}'