Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Latest commit

 

History

History
137 lines (87 loc) · 2.33 KB

CONTRIBUTING.md

File metadata and controls

137 lines (87 loc) · 2.33 KB

Contribution Guide

Prerequisites

In addition to default stable Rust toolchain you will a nightly Rust toolchain for rustfmt.

$ rustup toolchain install nightly

Also, you need install wasm-pack for Jason building and testing:

$ curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sudo sh

Operations

Take a look at Makefile for commands usage details.

Development environment

Boot up dockerized environment for Medea with Jason:

$ make up.dev

Boot up only Medea without Jason:

$ make up.medea

Building

To build/rebuild project and its Docker image use docker-wrapped command from Makefile:

$ make build dockerized=yes

To build only Medea:

$ make build.medea

# or in Docker
$ make build.medea dockerized=yes

To build only Jason:

$ make build.jason

# or in Docker
$ make build.jason dockerized=yes

To rebuild protobuf specs for Medea gRPC Control API:

$ make cargo.gen crate=medea-control-api-proto

Formatting

To auto-format Rust sources use command from Makefile:

$ make fmt

Linting

To lint Rust sources use command from Makefile:

$ make lint

Testing

To run unit tests use command from Makefile:

$ make test.unit

# or for concrete crate only
$ make test.unit crate=medea
$ make test.unit crate=medea-jason

To run integration tests use docker-wrapped commands from Makefile:

$ make test.integration

To run E2E tests use docker-wrapped commands from Makefile:

$ make test.e2e

Documentation

To generate Rust sources project documentation use command from Makefile:

$ make docs.rust

# if you don't wish to automatically open docs in browser
$ make docs.rust open=no

# or for concrete crate only
$ make docs.rust crate=medea-jason

CI integration

Add [skip ci] mark to commit message to omit triggering a CI build.