diff --git a/Makefile b/Makefile index 5a0a66b..4b6ebb8 100644 --- a/Makefile +++ b/Makefile @@ -59,4 +59,28 @@ install: fi @echo "all prerequisites installed successfully!" -.PHONY: db-create db-migrate db-query-prepare install +check: + @echo "Check: Running cargo check" + cargo check + +test: + @echo "Test: Running cargo test" + cargo test + +fmt: + @echo "Fmt: Running cargo fmt" + cargo +nightly fmt --all -- --check + +clippy: + @echo "Clippy: Running cargo clippy" + cargo clippy -- -D warnings + +verify: + @echo "Running all checks" + @make check + @make test + @make fmt + @make clippy + + +.PHONY: db-create db-migrate db-query-prepare install clippy fmt test check verify diff --git a/README.md b/README.md index ca808a1..4fa0082 100644 --- a/README.md +++ b/README.md @@ -77,3 +77,17 @@ make db-migrate ```bash cargo run ``` + + + +## Contributing + +Make sure to run the following command before pushing commits as this will run all the checks needed to pass the CI workflow. + +``` bash +make verify +``` + +` + +