mirror of
https://github.com/aljazceru/cdk.git
synced 2025-12-23 23:55:01 +01:00
68 lines
1.4 KiB
Makefile
68 lines
1.4 KiB
Makefile
import "./misc/justfile.custom.just"
|
|
import "./misc/test.just"
|
|
|
|
alias b := build
|
|
alias c := check
|
|
alias t := test
|
|
|
|
default:
|
|
@just --list
|
|
|
|
final-check: typos format clippy test
|
|
|
|
# run `cargo build` on everything
|
|
build *ARGS="--workspace --all-targets":
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
if [ ! -f Cargo.toml ]; then
|
|
cd {{invocation_directory()}}
|
|
fi
|
|
cargo build {{ARGS}}
|
|
|
|
# run `cargo check` on everything
|
|
check *ARGS="--workspace --all-targets":
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
if [ ! -f Cargo.toml ]; then
|
|
cd {{invocation_directory()}}
|
|
fi
|
|
cargo check {{ARGS}}
|
|
|
|
# run code formatters
|
|
format:
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
if [ ! -f Cargo.toml ]; then
|
|
cd {{invocation_directory()}}
|
|
fi
|
|
cargo fmt --all
|
|
nixpkgs-fmt $(echo **.nix)
|
|
|
|
# run tests
|
|
test: build
|
|
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
if [ ! -f Cargo.toml ]; then
|
|
cd {{invocation_directory()}}
|
|
fi
|
|
cargo test --lib
|
|
|
|
# Run pure integration tests
|
|
cargo test -p cdk-integration-tests --test integration_tests_pure
|
|
|
|
# run `cargo clippy` on everything
|
|
clippy *ARGS="--locked --offline --workspace --all-targets":
|
|
cargo clippy {{ARGS}}
|
|
|
|
# run `cargo clippy --fix` on everything
|
|
clippy-fix *ARGS="--locked --offline --workspace --all-targets":
|
|
cargo clippy {{ARGS}} --fix
|
|
|
|
typos:
|
|
typos
|
|
|
|
# fix all typos
|
|
[no-exit-message]
|
|
typos-fix:
|
|
just typos -w
|