mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 09:01:15 +00:00
README, CONTRIBUTING and Makefile
This commit is contained in:
parent
8ca33ae1e2
commit
47592911b9
3 changed files with 135 additions and 0 deletions
33
Makefile
Normal file
33
Makefile
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
.PHONY: fmt fmt-check lint test-unit test-integration site-format-check validate
|
||||
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
fmt-check:
|
||||
cargo fmt --all --check
|
||||
|
||||
lint:
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
|
||||
test-unit:
|
||||
cargo test --lib
|
||||
|
||||
test-integration:
|
||||
@if [ "$$(uname -s)" != "Linux" ]; then \
|
||||
echo "Integration tests require Linux and xvfb-run."; \
|
||||
exit 1; \
|
||||
fi
|
||||
@if ! command -v xvfb-run >/dev/null 2>&1; then \
|
||||
echo "xvfb-run is required to execute integration tests."; \
|
||||
exit 1; \
|
||||
fi
|
||||
XDG_SESSION_TYPE=x11 xvfb-run -a cargo test --test x11_runtime -- --test-threads=1
|
||||
|
||||
site-format-check:
|
||||
@if ! command -v pnpm >/dev/null 2>&1; then \
|
||||
echo "pnpm is required for site formatting checks."; \
|
||||
exit 1; \
|
||||
fi
|
||||
pnpm --dir site format:check
|
||||
|
||||
validate: fmt-check lint test-unit test-integration site-format-check
|
||||
Loading…
Add table
Add a link
Reference in a new issue