Thank you for your interest in contributing to our driver!
You can install required packages with the following command:
npm installYou also need to install NAPI-RS cli:
npm install -g @napi-rs/cliFor build process use this command:
npm run buildIf you want to build in debug mode use this command:
npm run build:debugCurrently, for the rust code we require new PRs to compile without warnings, pass cargo fmt and clippy.
For the JS code we require that prettier and eslint checks pass.
You can launch all Rust and JS static checks with the npm run pre-push command.
Before running any of the tests, ensure the driver is built correctly.
For the integration tests you need to do the following steps before running tests:
- Install scylla-ccm package
(
pip install --user https://github.com/scylladb/scylla-ccm/archive/master.zip). You may also use ccm but not all tests are guaranteed to pass while using it. - Have
java-8installed and available in path/usr/lib/jvm/java-8(this is for running integration tests with cassandra - scylla-ccm uses this hardcoded path)
If you want to run integration tests only with scylla, you don't have to install java.
You can run currently supported test with the following commands:
- Unit tests (
npm run unit) (this includes unit tests of the JS side and tests of the napi layer) - Integration tests (
npm run integration- with cassandra,CCM_IS_SCYLLA=true npm run integrationwith scylla)
There are also some categories of unsupported tests. See package.json for a list of all possible commands.