[tools] rust = { version = "1.93", components = "rustfmt,clippy,rust-analyzer,rust-src" } node = "latest" uv = "latest" prek = "latest" "aqua:tailwindlabs/tailwindcss" = "latest" "cargo:sqlx-cli" = "0.9.0-alpha.1" "github:watchexec/cargo-watch" = "latest" shellcheck = "latest" flyctl = "latest" "aqua:mvdan/sh" = "latest" [env] SQLX_OFFLINE = "false" [tasks] install-deps = "sudo apt-get update && sudo apt-get install -y --no-install-recommends clang lld libssl-dev pkg-config sqlite3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2t64 libnss3 libxshmfence1" install-e2e = """ CHROME_DIR="${MISE_DATA_DIR:-$HOME/.local/share/mise}/chrome-for-testing" mkdir -p "$CHROME_DIR" npx --yes @puppeteer/browsers install chrome@stable --path "$CHROME_DIR" npx --yes @puppeteer/browsers install chromedriver@stable --path "$CHROME_DIR" """ install-py-deps = "uv tool install djlint" fmt = { depends = ["fmt:rs", "fmt:sh", "fmt:assets"] } "fmt:rs" = "cargo fmt" "fmt:sh" = "shfmt -i 2 -s -w $(find . -name '*.sh' -not -path './target/*')" "fmt:assets" = "oxfmt --write $(find . \\( -name '*.css' -o -name '*.json' -o -name '*.yaml' -o -name '*.yml' -o -name '*.md' \\) -not -path './target/*' -not -path './.git/*')" lint = { depends = ["lint:rs", "lint:sh"] } "lint:rs" = "cargo clippy -- -D warnings" "lint:sh" = "find . -name '*.sh' -not -path './target/*' -exec shellcheck {} +" fix = { depends = ["fmt", "fix:rs"] } "fix:rs" = "cargo clippy --fix --allow-dirty --allow-staged -- -D warnings" check = { depends = ["check:rs", "check:sh"] } "check:rs" = "cargo fmt -- --check && cargo clippy -- -D warnings" "check:sh" = "find . -name '*.sh' -not -path './target/*' -exec shellcheck {} +" test = "cargo test" "test:e2e" = "cargo test --features e2e --test e2e"