[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--", "--emit=files"]

[tasks.clean]
command = "cargo"
args = ["clean"]

[tasks.build]
command = "cargo"
args = ["build"]
dependencies = ["clean"]

[tasks.cargo-test]
command = "cargo"
args = ["test"]

[tasks.test]
clear = true
run_task = { name = ["docker", "cargo-test", "docker-stop"] }

[tasks.docker]
command = "docker"
args = ["compose", "up", "--build", "-d"]

[tasks.docker-stop]
command = "docker"
args = ["compose", "down"]

[tasks.my-flow]
dependencies = [
    "format",
    "build",
    "test"
]