Skip to content

Latest commit

 

History

History
94 lines (57 loc) · 1.93 KB

CONTRIBUTING.md

File metadata and controls

94 lines (57 loc) · 1.93 KB

Contributing guide

Contributions are more than welcome!

Commit messages / PR title

Please ensure your pull request title conforms to Conventional Commits.

CI

Our CI checks are run using nix.

Development

To be able to reproduce CI, we recommend using nix.

Dev environment

We use the following tools:

Formatting

Linting

Nix devShell

  • Requires flakes to be enabled.

We provide a flake.nix that can bootstrap all of the above development tools.

To enter a development shell:

nix develop

To apply formatting, while in a devShell, run

pre-commit run --all

You can use direnv to auto-load the development shell. Just run direnv allow.

Running tests

The easiest way to run tests is with Nix (see below).

If you do not use Nix, you can also run the test suite locally.

Running tests and checks with Nix

If you just want to run all checks that are available, run:

nix flake check -Lv

To run individual checks, using Nix:

nix build .#checks.<your-system>.<check> -Lv

For example:

nix build .#checks.x86_64-linux.tests -Lv

For formatting and linting:

nix build .#checks.<your-system>.git-hooks-check -Lv

Running tests without nix

For reproducibility, we only run tests that can be sandboxed with nix, skipping integration tests. Running cargo test locally will run all tests, including integration tests.

Or, if you are using cargo-nextest, we provide an alias:

cargo tt