update readme and contributing guides (#90)

This commit is contained in:
Shahidh K Muhammed 2018-07-11 10:27:03 +05:30 committed by GitHub
parent 29654fa883
commit 83ab85fb04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 68 additions and 2 deletions

20
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,20 @@
# Contributing
[hasura/graphql-engine](https://github.com/hasura/graphql-engine) is a mono-repo consisting of 3 components. Each have their own contributing guides:
1. [Server (Haskell)](server/CONTRIBUTING.md)
2. [CLI (Go)](cli/CONTRIBUTING.md)
3. [Console (JavaScript)](console/CONTRIBUTING.md)
All of the three components have a single version, denoted by either the git tag or a combination of branch name and git commit sha.
## Common guidelines
- Please make sure there is an issue associated with the work the work you're doing.
- If you're working on an issue, please comment that you are doing so to prevent duplicate work by others also.
- Squash your commits and refer to the issue using `fix #<issue-no>` or `close #<issue-no>` in the commit message.
- Commit messages:
- Please keep the it under 100 characters. This allows the message to be easier to read on github as well as in various git tools and produces a nice, neat commit log
- Use the imperative present tense: "change" not "changed" nor "changes"
- Don't capitalize the first letter
- Do not add a dot (.) at the end

View File

@ -1,3 +1,15 @@
# Hasura GraphQL Engine
[![CircleCI](https://circleci.com/gh/hasura/graphql-engine.svg?style=svg)](https://circleci.com/gh/hasura/graphql-engine)
Source code for Hasura's GraphQL Engine, including CLI, API Console and Server.
## Getting started
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)
Follow the [official docs](https://docs.hasura.io/1.0/graphql/manual/getting-started/index.html).
## Contributing
Checkout our [contributing guide](CONTRIBUTING.md) for more details.

View File

@ -1,17 +1,27 @@
# Contributing
Thanks for you interest in Hasura GraphQL Engine CLI.
## Pre-requisites
- [Go 1.10](https://golang.org/doc/install)
- [GNU Make](https://www.gnu.org/software/make/)
You can follow your existing Golang workflow to fork, work on a branch and
submit PR. If you're new to forking and working on Golang repositories, please
follow the instructions below to make sure the import paths are correct.
follow the instructions below to make sure the import paths are correct:
- Fork the repo
- Fork the repo on GitHub
- `mkdir -p $GOPATH/src/github.com/hasura`
- `cd $GOPATH/src/github.com/hasura`
- `git clone https://github.com/<your-username>/graphql-engine`
- `cd graphql-engine`
- `git remote add upstream https://github.com/hasura/graphql-engine`
- `git checkout -b <branch-name>`
- `make deps`
- Work on the feature/fix
- If you modify files in `assets/`, run `make assets`
- Add tests and ensure all tests are passing (`make test`)
- Commit, push and submit PR
@ -32,3 +42,24 @@ workflow. The `.realize.yaml` config is already included in the repo.
`realize` watches the directory for changes and rebuilds the cli whenever a new
change happens. The cli is installed to `$GOPATH/bin/hasura`, which should
already be in your `PATH`. The config is located at `.realize/realize.yaml`.
## Tests
When you're adding a new feature, it is encouraged to add integration tests (unit tests also if possible) for the functions/api. You should run all the test and make sure everything passes before submitting the PR.
The tests expect a GraphQL Engine server instance to be running. You can point the tests to any GraphQL Engine server but please note that **the database should be empty**. The easiest way to do this is to run an Postgres and GraphQL Engine using [Docker Compose](https://github.com/hasura/graphql-engine-install-manifests). Once the server is running, you can run the tests by executing the make command:
```bash
HASURA_GRAPHQL_TEST_ENDPOINT=http://localhost:8080 make test
```
## Builds
To build a binary, execute the following command:
```bash
# make deps to install all go packages
make build
```
This will output cross-platform binaries to `_output` directory.

3
server/CONTRIBUTING.md Normal file
View File

@ -0,0 +1,3 @@
# Contributing
TODO