- Install Docker.
- Install Docker Compose.
- Install Lombok plugin and enable annotation processing in your IDE.
- Assemble project with Gradle:
./gradlew clean assemble
- We use Checkstyle and Findbug plugins to check code-style. You can run it locally before PR:
./gradlew check
Or commend below if you want to skip tests:
./gradlew check -x test
Best Practices for committing code are documented on the wiki
- Minimum code coverage requirement for the repo is 75%.
- We bump it upwards by 5% each week.
- Your PR cannot drop the code coverage by more than 1% at any point in time.
To build Docker images execute following:
./gradlew clean assemble && sh deploy/docker/build.sh
To run functional tests locally, you have to have running Postgres instance. Below is example how to start Postgres locally with all backend expected databases:
docker-compose -f deploy/docker-compose/postgres.yml up
And down it removing all data:
docker-compose -f deploy/docker-compose/postgres.yml down
Below is example how to start cluster locally with dev
profile:
docker-compose -f deploy/docker-compose/cluster.yml up
And down it removing all containers and data:
docker-compose -f deploy/docker-compose/cluster.yml down
- build Docker images;
- start cluster locally;
- run integration tests with command below:
./gradlew :it-service:integrationTest -PexecIntegrationTest=true
- optionally down the cluster.
This is a multi-module gradle build with each microservice running in it's own Docker container. Each microservice consists of 2 modules:
<service-name>-service-api
<service-name>-service
Head to slack channel dev-backend to get your questions answered.