Most tests run quick, execute them with:
cargo test
Refreshing the cache needs a working internet connection and might take a while. These tests are by default disabled. Include them with
cargo test -- --include-ignored
Use tarpaulin
to check for code coverage. Make sure to --include-ignored
tests and include the integration tests with --follow-exec
. This can take a long time. To generate a HTML report, run the check with
cargo tarpaulin --engine llvm --all-features --workspace --timeout 360 --out Html --follow-exec -- --include-ignored
First build nps
in release mode.
cargo build --release
Then run benchmarks on the produced executable with:
hyperfine './target/release/nps -e neovim'
Review the hooks in the hooks folder and use them with
git config core.hooksPath hooks
-
Document future changes in the CHANGELOG.md under "Unreleased". Check if the
pre-push
hooks pass - apart from tags../hooks/pre-push
-
Do a dry-run with
cargo release [LEVEL|VERSION]
and review the changes. Possible choices for
LEVEL
arebeta
,alpha
orrc
for development (pre-) releases andmajor
,minor
,patch
orrelease
(removes the pre-release extension) for production releases. -
Execute the
cargo release
. This will run the tests, tag the release and push to GitHub.cargo release [LEVEL|VERSION] --execute --no-publish
-
Create a pull request for the
development
branch intomain
. If all pre-checks succeed, conclude the pull request. A release draft will is created from CHANGELOG.md. -
Review the release draft under "Releases" and publish the release.
GitHub.com does not allow for fast-forward merges on the web UI. This means that the tags created on the development
branch will not point to the main branch after merging. To fix this we need to disable the default merging and create our own way.
-
Abuse "Setting -> General -> Pull Requests" and "Settings -> Rules -> Ruleset (main)" to create conflicting requirements for the
main
branch. This disables merging on the web UI. See: https://github.com/orgs/community/discussions/4618#discussioncomment-11652479 -
Instead, use GitHub actions to fast-forward merge. See https://github.com/sequoia-pgp/fast-forward for details.
After all tests have passed, comment /fast-forward
in the PR discussions.