Skip to content

Commit 8c322ea

Browse files
committed
[readme][m]: merges contributing guidelines
1 parent 6035594 commit 8c322ea

2 files changed

Lines changed: 30 additions & 29 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,33 @@ We can make different queries:
7575
#### Query Table with Limit and Offset (pagination)
7676

7777
![Query Table Limit Offset](documentation/query-table-limit-offset.png)
78+
79+
## Contributing
80+
81+
### Local development environment
82+
83+
1. launch bg services (postgres + hasura) (`bash run-mock-environment.sh`)
84+
2. `cp .env.example .env`
85+
3. `yarn`
86+
4. `yarn start` to launch server / `yarn test` to run tests
87+
5. install and use prettier to format code - https://prettier.io/docs/en/install.html (otherwise new builds will likely fail)
88+
89+
Please don't forget to add new variables to `.env.example` - they also will be used in ci tests.
90+
91+
### CI
92+
93+
#### Tests
94+
95+
Tests and formating check and run automatically on every push and pull request to master. They run on Docker hub. See documentation here https://docs.docker.com/docker-hub/builds/automated-testing/
96+
97+
To simulate tests as running on dockerhub you can run `bash run-tests-in-docker.sh` file.
98+
99+
If a pull request has failed checks it shows an error message in GitHub. The link to DockerHub does not work though.
100+
You will need to navigate there:
101+
102+
- Docker repository is here https://hub.docker.com/repository/docker/datopian/data-api
103+
- To see build jobs go to builds https://hub.docker.com/repository/docker/datopian/data-api/builds and find your build/test
104+
105+
#### Docker image builds
106+
107+
After every push to master and successful tests there is a new docker image built here https://hub.docker.com/repository/docker/datopian/data-api/builds

0 commit comments

Comments
 (0)