[env] RUST_BACKTRACE = "1" [tasks.install-nightly] script = ''' if [ -z "$(rustup toolchain list | grep 'nightly')" ]; then rustup toolchain install nightly --component rustfmt else echo "nightly is already installed." fi ''' [tasks.install-nightly.windows] command = "rustup" args = ["toolchain", "install", "nightly", "--component", "rustfmt"] [tasks.install-fmt] command = "rustup" args = ["component", "add", "rustfmt", "--toolchain", "nightly"] dependencies = ["install-nightly"] [tasks.fmt] toolchain = "nightly" command = "cargo" args = ["fmt"] dependencies = ["install-fmt"] [tasks.doctest-slow] command = "cargo" args = ["--locked", "test", "--all-features", "--jobs", "1", "--doc", "--", "--quiet"] [tasks.doctest] command = "cargo" args = ["--locked", "test", "--all-features", "--doc", "--", "--quiet"] [tasks.test] command = "cargo" args = ["--locked", "test", "--all-features", "--tests", "--", "--quiet"] dependencies = ["doctest"] [tasks.tdd] install_crate = "cargo-watch" command = "cargo" args = [ "watch" , "--watch", "./src" , "--watch", "./tests" , "--delay", "0" , "-x", "make -t test" ] [tasks.cdd] # "compile" driven development? install_crate = "cargo-watch" command = "cargo" args = [ "watch" , "--watch", "./src" , "--watch", "./tests" , "-x", "check --all-features" , "-x", "make fmt" ] [tasks.check-fmt] toolchain = "nightly" command = "cargo" args = ["fmt", "--", "--check"] dependencies = ["install-fmt"] [tasks.check-clippy] command = "cargo" args = ["clippy"] [tasks.ci] dependencies = ["test", "check-fmt", "check-clippy"] [tasks.update-readme] script = "cargo install cargo-readme && cargo readme > README.md"