humlib / humlib-be

The backend of HumLib - The Human Library in Computer Science
MIT License
2 stars 0 forks source link

Continuous Integration Coverage Code Quality

humlib-be

Backend for HumLib - The Human Library in Computer Science

Development workflow

We use GitHub flow as git branching strategy. It is based on the 6 principles below.

For commit messages, we use GitMoji. There is a handy IntelliJ plugin to help you choose the right emoji. Other than that, a commit message should follow the pattern :emoji: Short description (#:issue number:).

SDKman

For automatically using Java 17 when entering this repository, simply set sdkman_auto_env=true in ~/.sdkman/etc/config This makes sdkman switch to the java version defined in .sdkmanrc automatically when you cd into this repo.

CI

You need to have a pull request for your branch to have the defined GitHub workflows executed automatically. On push to 'main', so basically when a pull request is merged, another run is triggered for 'main'.

The pipeline builds the application and executes tests. It then uploads coverage data and test results as artifacts. Both are posted as a comment to PRs. Unit test results can also be reviewed as a dedicated check run. Code coverage results are uploaded to Codacy

API first

We use OASv3.1 to define humlib-be's API. To edit the API specification, please use Postman. Contact one of the team members to get access.

The API can be generated by running ./mvnw openapi-generator:generate or the appropriate run config in IntelliJ. The generator does not support OpenAPI 3.1, yet. Anyway, the generated files are currently not in use.

Local development (Docker)

Prerequisites

Setup

All services

Elasticstack

version: 8.0.0

Start and stop commands

Usage

Built-in users

Keycloak

Start and stop commands

Usage

Built-in users

Actuator

For observing the state of the application, you can use Spring's Actuator endpoints offered at port 8081: