From bf67e5e24659c2e675114e96a0848bbd321f65f6 Mon Sep 17 00:00:00 2001 From: nizar-m Date: Sun, 20 Jan 2019 15:19:56 +0530 Subject: [PATCH] update Server Contributing.md (close #1370) (#1414) --- server/CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/server/CONTRIBUTING.md b/server/CONTRIBUTING.md index 5e19fa5fdb8..7e8f44053cc 100644 --- a/server/CONTRIBUTING.md +++ b/server/CONTRIBUTING.md @@ -17,7 +17,14 @@ own machine and how to contribute. ### Compile - `cd graphql-engine/server` -- `stack build --fast` +- `stack build --fast --flag graphql-engine:local-console` +- To enable console for local development, if the folder `../console/node_modules/` is not present + +``` + cd ../console + npm install + cd ../server +``` ### Run - Make sure postgres is running @@ -29,7 +36,32 @@ own machine and how to contribute. - Add test cases if relevant ### Test -- Run tests: `stack test --ta --database-url=` +- Install the py-test dependencies: + +``` +pip3 install -r tests-py/requirements.txt +``` + +- Make sure postgres is running +- Run the graphql-engine: + +``` +stack exec graphql-engine -- --database-url= serve` +``` + +- Set the environmental variables for event-trigger tests + +``` +export EVENT_WEBHOOK_HEADER="MyEnvValue" +export WEBHOOK_FROM_ENV="http://127.0.0.1:5592" +``` + +- Run tests: + +``` +cd tests-py +pytest -vv --hge-url=http://127.0.0.1:8080 --pg-url= +``` ### Create Pull Request - Make sure your commit messages meet the [guidelines](../CONTRIBUTING.md).