Skip to content

Commit

Permalink
docs(add): Add cmd for running units with coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Ivanov <[email protected]>
  • Loading branch information
Daniel-K-Ivanov committed Oct 11, 2021
1 parent b0b89fe commit 50b14cd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ docker-compose pull

In addition to Go, you will need to run [PostgreSQL](https://postgresql.org) v9.6 database. The easiest way you can do that is by running it from the docker image:

```
```shell
docker-compose up db
```

Expand All @@ -30,24 +30,29 @@ You can run the database separately, but you will have to edit the validator def

### Build application

```
```shell
go build cmd/*
```

### Run application

After you have run the database and compiled the node, you need to have the necessary [configuration](configuration.md) populated and run:
```
```shell
go run cmd/*
```

### Unit Tests
In order to run the unit tests, one must execute the following command:
```
```shell
go test $(go list ./... | grep -v e2e)
```
The command filters out the e2e tests that require an additional setup.

To get the coverage report execute the following command:
```shell
go test -cover $(go list ./... | grep -v e2e)
```

## Running via Docker Compose

Docker Compose consists of scripts for the following components
Expand All @@ -65,11 +70,11 @@ Before you run, [configure](configuration.md) the application updating the [node
This file persists as a volume to the `Application` container.

Finally, run:
```
```shell
docker-compose up
```

Shutting down the containers:
```
```shell
docker-compose down
```

0 comments on commit 50b14cd

Please sign in to comment.