Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 3.65 KB

CONTRIBUTING.md

File metadata and controls

68 lines (47 loc) · 3.65 KB

Contributing to testcontainers-rs-modules

First of all, thank you for contributing to testcontainers-rs-modules-community. All contributions are welcome!

Getting started

The quick-wins!

Reporting bugs

  • Check if there is an existing issue first.
  • You may also want to check bugs in testcontainers-rs library when applicable
  • When in doubt whether you've found new issue/bug or not, consider discussing it with our community on Slack

Requesting new modules

  • Check if there is an existing issue, since your request might be tracked there.
  • Feel free to reach out to our community to clarify your use case!

Code Contributions

Setting up local development

Working with existing modules

  • When extending/changing existing API, ensure that any new ones are tracked on rustdocs
  • When fixing an issue, consider providing a new test case for it

Adding new modules or changing existing ones

Before adding a new module, it's recommended reviewing the testcontainers-rs library along with existing modules that are built on top of it! In addition, pay attention to our project conventions : public APIs are exposed through mod.rs files and conditionally compiled as Cargo features.

  • Ensure you have a proper feature configuration on Cargo.toml when adding a new module
  • Ensure you have declared pinned versions of Docker image tags for your module
  • Consider providing a Default trait implementation for your TestContainer struct when applicable
  • Consider also using the Builder pattern when your TestContainer accepts several different env vars!
  • Ensure you have added proper rustdocs reflecting the image reference (e.g. to docker-hub) and examples of how to use your APIs.
  • Ensure you have added tests exercising your module
  • Consider also providing an example on how to use your module from an app

Raising Pull Requests

  • Ensure you'll have a green build on your commits, for instance running some of our CI checks
cargo fmt --all -- --check
cargo clippy --all-features
cargo hack test --each-feature --clean-per-run 

License

Please note that all code contributed by you will follow the MIT license, without any additional terms.