Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 1.49 KB

README.md

File metadata and controls

79 lines (59 loc) · 1.49 KB

pipeline status

Midgard API


Mirror

This repo mirrors from THORChain Gitlab to Github. To contribute, please contact the team and commit to the Gitlab repo:

https://gitlab.com/thorchain/midgard


=============

Run Midgard API

To run Midgard you will need two terminal windows or tabs. In the first tab, run...

make pg
# create an user (if you have not already done it before)
make create-user
# create a database (if you have not already done it before)
make create-database

In the second tab, run...

make install run

Run mock server

To use a mock server run everything as described in Run Midgard API. After that, run following command in another terminal:

make run-thormock

Run generated specs locally

First, run everything as described in Run chain service and Run mock server by using different terminals.

Open http://127.0.0.1:8080/v1/doc in your browser.

Testing

make test

For rapid testing, in one terminal tab...

make pg

In another tab, run...

make test-internal

If you'd like to run tests everytime there is a change to a go file...

make test-watch

Short Testing

You can run unit tests and omit the ones that require a running instance of timescale running on top of postgres

make test-short

Linting

make lint