-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add taskfile and address clippy errors
- Loading branch information
1 parent
73d04d6
commit a92e330
Showing
3 changed files
with
224 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
version: '3' | ||
|
||
vars: | ||
CARGO_INCREMENTAL: 0 | ||
RUSTFLAGS: "-D warnings" | ||
|
||
tasks: | ||
default: | ||
cmds: | ||
- task --list-all | ||
silent: true | ||
|
||
build: | ||
desc: Build the project | ||
cmds: | ||
- cargo build | ||
sources: | ||
- src/**/*.rs | ||
- Cargo.toml | ||
generates: | ||
- target/debug/tbd | ||
|
||
test: | ||
desc: Run all tests | ||
cmds: | ||
- cargo test --all-features | ||
|
||
check: | ||
desc: Run all checks (format, clippy, test) | ||
cmds: | ||
- task: fmt-check | ||
- task: clippy | ||
- task: test | ||
|
||
clippy: | ||
desc: Run clippy | ||
cmds: | ||
- cargo clippy --all-targets --all-features -- -D warnings | ||
|
||
fmt: | ||
desc: Format code | ||
cmds: | ||
- cargo fmt --all | ||
|
||
fmt-check: | ||
desc: Check code formatting | ||
cmds: | ||
- cargo fmt --all -- --check | ||
|
||
clean: | ||
desc: Clean build artifacts | ||
cmds: | ||
- cargo clean | ||
|
||
doc: | ||
desc: Generate documentation | ||
cmds: | ||
- cargo doc --no-deps | ||
sources: | ||
- src/**/*.rs | ||
generates: | ||
- target/doc | ||
|
||
watch: | ||
desc: Watch for changes and run tests | ||
cmds: | ||
- cargo watch -x test | ||
|
||
release: | ||
desc: Build release version | ||
cmds: | ||
- cargo build --release | ||
sources: | ||
- src/**/*.rs | ||
- Cargo.toml | ||
generates: | ||
- target/release/tbd | ||
|
||
install-tools: | ||
desc: Install development tools | ||
cmds: | ||
- cargo install cargo-watch cargo-audit cargo-outdated | ||
- rustup component add clippy rustfmt | ||
|
||
audit: | ||
desc: Run security audit | ||
cmds: | ||
- cargo audit | ||
|
||
outdated: | ||
desc: Check for outdated dependencies | ||
cmds: | ||
- cargo outdated | ||
|
||
ci: | ||
desc: Run CI pipeline locally | ||
cmds: | ||
- task: clean | ||
- task: check | ||
- task: build | ||
- task: test | ||
- task: audit | ||
|
||
# Development workflow tasks | ||
init: | ||
desc: Initialize a new test project | ||
dir: target | ||
cmds: | ||
- cargo run -- init --name {{.CLI_ARGS | default "test-project"}} | ||
|
||
run: | ||
desc: Run the CLI with arguments | ||
cmds: | ||
- cargo run -- {{.CLI_ARGS}} | ||
|
||
dev: | ||
desc: Start development environment | ||
cmds: | ||
- cargo watch -x 'run -- {{.CLI_ARGS}}' | ||
|
||
# Container tasks | ||
docker-build: | ||
desc: Build Docker image | ||
cmds: | ||
- docker build -t tbdtools/tbd-iac:latest . | ||
|
||
docker-run: | ||
desc: Run Docker container | ||
cmds: | ||
- docker run --rm -it tbdtools/tbd-iac:latest {{.CLI_ARGS}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters