[env] DATABASE_URL = { script = [ ''' [ "$CARGO_MAKE_CI" = "TRUE" ] && echo "postgres://postgres@docker/postgres" || echo "postgres://postgres@localhost/postgres" ''' ]} [config] on_error_task = "post-test" [tasks.test] command = "cargo" args = ["test"] dependencies = ["diesel", "test-init"] [tasks.test-verbose] command = "cargo" args = ["test", "--verbose"] dependencies = ["diesel", "test-verbose-init"] [tasks.test-init] command = "cargo" args = ["test", "--", "--ignored"] dependencies = ["diesel"] [tasks.test-verbose-init] command = "cargo" args = ["test", "--verbose", "--", "--ignored"] dependencies = ["diesel"] [tasks.pre-test] command = "docker-compose" args = ["up", "-d"] [tasks.post-test] command = "docker-compose" args = ["down"] [tasks.migrations] install_crate = { crate_name = "diesel_cli", binary = "diesel", test_arg = "--help", args = ["--no-default-features", "--features postgres"] } command = "diesel" args = ["migration", "run"] [tasks.diesel] install_crate = { crate_name = "diesel_cli", binary = "diesel", test_arg = "--help", args = ["--no-default-features", "--features postgres"] } command = "diesel" args = ["setup"] dependencies = ["sleep", "migrations"] [tasks.sleep] command = "sleep" args = ["2"] [tasks.pre-test-verbose] alias = "pre-test" [tasks.post-test-verbose] alias = "post-test"