Skip to content

Latest commit

 

History

History
69 lines (45 loc) · 1.48 KB

DEVELOPMENT.md

File metadata and controls

69 lines (45 loc) · 1.48 KB

Development

Dependencies

rustup component add llvm-tools-preview
cargo install cargo-llvm-cov
cargo install cargo-nextest

Running Tests

cargo nextest run --workspace --all-features

# To test individual features
for i in {0..0}; do cargo test_$i || break; done

Coverage

Collect coverage and output as lcov.

./coverage.sh

Collect coverage and open html report.

./coverage.sh && cargo coverage_open

Releasing

  1. Update crate versions.

    sd -s 'version = "0.8.0"' 'version = "0.9.0"' $(fd -tf -F toml) README.md src/lib.rs
    
    # Make sure only `proc_macro_roids` crates are updated.
    git --no-pager diff | rg '^[+]' | rg -v '(proc_macro_roids)|(\+\+\+)|\+version'
  2. Update CHANGELOG.md with the version and today's date.

  3. Push a tag to the repository.

    The publish GitHub workflow will automatically publish the crates to crates.io.

Note:

An alternative to cargo-release is cargo-workspaces, which may be used in case crates need to be published one by one -- if many new crates are being published, cargo-release gates the number of crates that can be published at one go.

cargo workspaces \
  publish \
  --from-git \
  --allow-branch main \
  --force '*' \
  --no-git-tag