Skip to content

Commit

Permalink
Merge branch 'master' into docs-api-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
rikinsk authored Dec 15, 2019
2 parents a91f247 + 421a182 commit 71ec6dc
Show file tree
Hide file tree
Showing 111 changed files with 3,281 additions and 2,692 deletions.
5 changes: 2 additions & 3 deletions .circleci/cli-builder.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM golang:1.10
FROM golang:1.13

ARG upx_version="3.94"

# install go dependencies
RUN go get github.com/golang/dep/cmd/dep \
&& go get github.com/mitchellh/gox \
RUN go get github.com/mitchellh/gox \
&& go get github.com/hasura/go-bindata/go-bindata \
&& go get github.com/tcnksm/ghr

Expand Down
50 changes: 39 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
- image: hasura/graphql-engine-server-builder:20190826
- image: circleci/postgres:12-alpine-postgis
<<: *test_pg_env

test_server_pg_11:
<<: *test_server
environment:
Expand Down Expand Up @@ -263,30 +263,53 @@ jobs:
- image: circleci/postgres:9.5-alpine-postgis
<<: *test_pg_env

server_property_tests:
resource_class: large
docker:
- image: hasura/graphql-engine-server-builder:20190826
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- server-app-cache-{{ .Branch }}-{{ .Revision }}
- restore_cache:
keys:
- server-deps-cache-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/stack.yaml" }}
- run:
name: Run property tests
environment:
GHCRTS: -N2
command: |
/build/_server_output/graphql-engine-tests property
test_cli_with_last_release:
docker:
- image: hasura/graphql-engine-cli-builder:v0.4
- image: hasura/graphql-engine-cli-builder:20191205
- image: circleci/postgres:10-alpine
environment:
POSTGRES_USER: gql_test
POSTGRES_DB: gql_test
working_directory: /go/src/github.com/hasura/graphql-engine
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
- cli-gopkg-{{ checksum "cli/go.mod" }}-{{ checksum "cli/go.sum" }}
- run:
name: get cli dependencies
working_directory: cli
command: make deps
- save_cache:
key: cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
key: cli-gopkg-{{ checksum "cli/go.mod" }}-{{ checksum "cli/go.sum" }}
paths:
- cli/vendor
- /go/pkg
- *wait_for_postgres
- run:
name: test cli
Expand All @@ -298,28 +321,28 @@ jobs:
# test and build cli
test_and_build_cli:
docker:
- image: hasura/graphql-engine-cli-builder:v0.4
- image: hasura/graphql-engine-cli-builder:20191205
- image: circleci/postgres:10-alpine
environment:
POSTGRES_USER: gql_test
POSTGRES_DB: gql_test
working_directory: /go/src/github.com/hasura/graphql-engine
working_directory: ~/graphql-engine
steps:
- attach_workspace:
at: /build
- *skip_job_on_ciignore
- checkout
- restore_cache:
keys:
- cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
- cli-gopkg-{{ checksum "cli/go.mod" }}-{{ checksum "cli/go.sum" }}
- run:
name: get cli dependencies
working_directory: cli
command: make deps
- save_cache:
key: cli-vendor-{{ checksum "cli/Gopkg.toml" }}-{{ checksum "cli/Gopkg.lock" }}
key: cli-gopkg-{{ checksum "cli/go.mod" }}-{{ checksum "cli/go.sum" }}
paths:
- cli/vendor
- /go/pkg
- *wait_for_postgres
- run:
name: test cli
Expand Down Expand Up @@ -498,6 +521,10 @@ workflows:
<<: *filter_only_vtags
requires:
- build_server
- server_property_tests:
<<: *filter_only_vtags
requires:
- build_server
- test_server_upgrade:
<<: *filter_only_vtags
requires:
Expand All @@ -510,6 +537,7 @@ workflows:
- test_server_pg_10
- test_server_pg_9.6
- test_server_pg_9.5
- server_property_tests
- test_server_upgrade
- test_cli_with_last_release:
<<: *filter_only_vtags
Expand Down
2 changes: 1 addition & 1 deletion .circleci/test-cli-with-last-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ PID=$!
wait_for_port 8080

# test cli
GOCACHE=off HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" HASURA_GRAPHQL_TEST_ADMIN_SECRET="abcd" make test
HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" HASURA_GRAPHQL_TEST_ADMIN_SECRET="abcd" make test
kill -s INT $PID
2 changes: 1 addition & 1 deletion .circleci/test-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ PID=$!
wait_for_port 8080

# test cli
GOCACHE=off HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" HASURA_GRAPHQL_TEST_ADMIN_SECRET="abcd" make test
HASURA_GRAPHQL_TEST_ENDPOINT="http://localhost:8080" HASURA_GRAPHQL_TEST_ADMIN_SECRET="abcd" make test
kill -s INT $PID
4 changes: 2 additions & 2 deletions .circleci/test-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ run_pytest_parallel() {
fi
}

echo -e "\n$(time_elapsed): <########## RUN GRAPHQL-ENGINE HASKELL TESTS ###########################################>\n"
"${GRAPHQL_ENGINE_TESTS:?}"
echo -e "\n$(time_elapsed): <########## RUN GRAPHQL-ENGINE HASKELL TESTS(migrate) ###########################################>\n"
"${GRAPHQL_ENGINE_TESTS:?}" migrate

echo -e "\n$(time_elapsed): <########## TEST GRAPHQL-ENGINE WITHOUT ADMIN SECRET ###########################################>\n"
TEST_TYPE="no-auth"
Expand Down
4 changes: 1 addition & 3 deletions cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@ from [shahidhk](https://github.com/shahidhk)'s [calendar](https://calendly.com/s

## Pre-requisites

- [Go >= 1.10](https://golang.org/doc/install)
- [Go >= 1.11](https://golang.org/doc/install)
- [GNU Make](https://www.gnu.org/software/make/) (optional)

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:

- 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/cli`
- `git remote add upstream https://github.com/hasura/graphql-engine`
Expand Down
Loading

0 comments on commit 71ec6dc

Please sign in to comment.