mirror of
https://github.com/harivansh-afk/deskctl.git
synced 2026-04-15 05:02:08 +00:00
tests and tooling (#4)
* init openspec * clean out src, move mod into lib, remove trash * create tests * pre-commit hook * add tests to CI * update website * README, CONTRIBUTING and Makefile * openspec * archive task * fix ci order * fix integration test * fix validation tests
This commit is contained in:
parent
7dfab68304
commit
3819a85c47
24 changed files with 892 additions and 286 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