[tasks.license-check]
command = "licensure"
args = ["--check", "--project"]
[tasks.build-demo]
cwd = "demo"
command = "cargo"
args = ["leptos", "build", "--release", "--precompress", "-vv"]
[tasks.lint-library]
cwd = "."
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint-test-overview]
cwd = "./overview"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint-test-overview-codegen]
cwd = "./overview/codegen"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint-demo]
cwd = "./demo"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint-demo-codegen]
cwd = "./demo/codegen"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint-demo-macros]
cwd = "./proc-macros"
command = "cargo"
args = ["clippy", "--all-targets", "--all-features", "--", "-D", "warnings"]
[tasks.lint]
run_task = { name = [
"lint-library",
"lint-test-overview",
"lint-test-overview-codegen",
"lint-demo",
"lint-demo-codegen",
"lint-demo-macros",
] }
[tasks.unit-tests]
cwd = "."
command = "cargo"
args = ["nextest", "run"]
[tasks.integration-tests]
cwd = "overview"
script = '''
#!/bin/sh
set +e
cargo leptos build --precompress --release;
target/release/overview &
echo "Up and running";
cd end2end;
npm install;
# This script supports nixos with devenv or ubuntu:24 due to playwright.
if command -v devenv >/dev/null 2>&1
then
CI=1 devenv shell playwright test;
else
npx playwright install-deps;
npx playwright install;
CI=1 npx playwright test;
fi
# Kills whatever this script spawned
kill $! && echo "killed server";
'''
[tasks.tests]
run_task = { name = [
"unit-tests",
"integration-tests"
] }
[tasks.mimic-ci]
run_task = { name = [
"license-check",
"lint",
"tests"
] }