Rust/test-crate/ci.sh

27 lines
521 B
Bash
Executable File

#!/usr/bin/env bash
###
## This script replicates the same steps as ci, except for cargo audit
###
# Turn on the guard rails
set -exuo pipefail
CRATE="test-crate"
## TODO use subshell magic to make a nice interface here
# Lint the formatting
nix build .#lints.format.$CRATE -L
# Audit it
nix develop -c cargo audit
# Run clippy
nix build .#lints.clippy.$CRATE -L
# Build it
nix build .#$CRATE -L
# Test it
nix develop -c cargo nextest run
nix develop -c cargo test --doc
# Document it
nix build .#docs.$CRATE.doc -L