这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
967f4f4
remove raven's json test cases
Sep 10, 2018
f79615f
add tests for events
Sep 10, 2018
a083b7e
share HGECtx across all tests
Sep 10, 2018
af47bb9
don't start the tests if context can't be created
Sep 10, 2018
70ab80a
Merge branch 'tests-py' of github.com:hasura/graphql-engine into test…
arvi3411301 Sep 11, 2018
a1d318a
Move tests into classes and use transact for setup/teardown
Sep 11, 2018
0591233
Merge branch 'master' into tests-py
shahidhk Sep 12, 2018
4810e99
add python based tests to circle config
shahidhk Sep 12, 2018
6d03df1
Merge branch 'tests-py' of github.com:hasura/graphql-engine into test…
arvi3411301 Sep 12, 2018
8ecf8ac
replace space with tab in makefile
shahidhk Sep 12, 2018
f36b439
change python to 3
shahidhk Sep 12, 2018
a73c1c5
change working directory, use system ghc
shahidhk Sep 12, 2018
f0e9b84
change webhook to 127.0.0.1 in event tests
Sep 13, 2018
4d806c9
randomish port number for webhook handler in event tests
Sep 13, 2018
9aca832
added subscriptions basic test
arvi3411301 Sep 13, 2018
463a1d3
Merge branch 'tests-py' of github.com:hasura/graphql-engine into test…
arvi3411301 Sep 13, 2018
1a310b3
modified tests for subscriptions
arvi3411301 Sep 13, 2018
156073d
added version test
arvi3411301 Sep 14, 2018
1037259
skip subscription start_duplicate test
arvi3411301 Sep 14, 2018
543b6a4
Tests for GraphQL queries and mutations in pytest framework
nizar-m Sep 14, 2018
21467de
Adding tests for permissions: GraphQL inserts and updates
nizar-m Sep 17, 2018
5eb3a0d
Merge branch 'master' into tests-py
0x777 Sep 17, 2018
8c3026a
add cache restore
shahidhk Sep 17, 2018
4d9f899
remove circleci from ciignore
shahidhk Sep 17, 2018
b9a386b
comment stack hpc command
shahidhk Sep 17, 2018
79c7b9e
copy tix file to build output dir
ecthiender Sep 17, 2018
326f5de
comment coverage generation
shahidhk Sep 17, 2018
3d2a50a
comment moving tix file
shahidhk Sep 17, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .ciignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ assets/*
docs/*
community/*
install-manifests/*
.circleci/*
.ciignore
.gitignore
77 changes: 77 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,40 @@ refs:
command: |
DATABASE_URL="postgres://gql_test:@localhost:5432/gql_test" make ci-test

# ref pytest server job
pytest_server: &pytest_server
working_directory: ~/graphql-engine
steps:
- checkout
- restore_cache:
keys:
- server-deps-cache-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/stack.yaml" }}
- attach_workspace:
at: /build
- *wait_for_postgres
- run:
command: /build/_server_output/graphql-engine serve
background: true
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://gql_test:@localhost:5432/gql_test
- run:
name: create test output dir
command: |
mkdir -p /build/_server_test_output/$PG_VERSION
- run:
name: pytest the server
working_directory: ./server/tests-py
environment:
DATABASE_URL: postgres://gql_test:@localhost:5432/gql_test
HGE_URL: http://localhost:8080
command: |
pip3 install -r requirements.txt
pytest -vv --hge-url="$HGE_URL" --pg-url="$DATABASE_URL"
## commented for the timesake
# stack --system-ghc hpc report /build/_server_output/graphql-engine.tix --destdir /build/_server_test_output/$PG_VERSION
- store_artifacts:
path: /build/_server_test_output
destination: server_test

version: 2
jobs:
Expand Down Expand Up @@ -155,6 +189,34 @@ jobs:
- image: circleci/postgres:9.5-alpine
<<: *test_pg_env

# pytest the server with postgres versions >= 9.5
pytest_server_pg_10.4:
<<: *pytest_server
environment:
PG_VERSION: "10_4"
docker:
- image: hasura/graphql-engine-server-builder:v0.3.2
- image: circleci/postgres:10.4-alpine
<<: *test_pg_env

pytest_server_pg_9.6:
<<: *pytest_server
environment:
PG_VERSION: "9_6"
docker:
- image: hasura/graphql-engine-server-builder:v0.3.2
- image: circleci/postgres:9.6-alpine
<<: *test_pg_env

pytest_server_pg_9.5:
<<: *pytest_server
environment:
PG_VERSION: "9_5"
docker:
- image: hasura/graphql-engine-server-builder:v0.3.2
- image: circleci/postgres:9.5-alpine
<<: *test_pg_env

# test and build cli
test_and_build_cli:
docker:
Expand Down Expand Up @@ -280,12 +342,27 @@ workflows:
<<: *filter_only_vtags
requires:
- build_server
- pytest_server_pg_10.4:
<<: *filter_only_vtags
requires:
- build_server
- pytest_server_pg_9.6:
<<: *filter_only_vtags
requires:
- build_server
- pytest_server_pg_9.5:
<<: *filter_only_vtags
requires:
- build_server
- all_server_tests_pass:
<<: *filter_only_vtags
requires:
- test_server_pg_10.4
- test_server_pg_9.6
- test_server_pg_9.5
- pytest_server_pg_10.4
- pytest_server_pg_9.6
- pytest_server_pg_9.5
- test_and_build_cli:
<<: *filter_only_vtags
requires:
Expand Down
4 changes: 2 additions & 2 deletions .circleci/server-builder.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG stack_ver="1.7.1"
# Install GNU make, curl, git and docker client. Required to build the server
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get install -y curl g++ gcc libc6-dev libpq-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg upx netcat \
&& apt-get install -y curl g++ gcc libc6-dev libpq-dev libffi-dev libgmp-dev make xz-utils zlib1g-dev git gnupg upx netcat python3 python3-pip \
&& curl -Lo /tmp/docker-${docker_ver}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${docker_ver}.tgz \
&& tar -xz -C /tmp -f /tmp/docker-${docker_ver}.tgz \
&& mv /tmp/docker/* /usr/bin \
Expand All @@ -20,4 +20,4 @@ RUN apt-get -y update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /usr/share/doc/ \
&& rm -rf /usr/share/man/ \
&& rm -rf /usr/share/locale/
&& rm -rf /usr/share/locale/
2 changes: 2 additions & 0 deletions server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ci-binary:
mkdir -p $(build_output)
cp $(build_dir)/$(project)/$(project) $(build_output)
cp "$(build_dir)/$(project)-test/$(project)-test" $(build_output)
## commented for now
#cp $(project_dir)/$(project).tix $(build_output)
echo "$(version)" > $(build_output)/version.txt

ci-test:
Expand Down
49 changes: 0 additions & 49 deletions server/testcases/add_column.json

This file was deleted.

42 changes: 0 additions & 42 deletions server/testcases/add_existing_table.json

This file was deleted.

42 changes: 0 additions & 42 deletions server/testcases/add_existing_view.json

This file was deleted.

84 changes: 0 additions & 84 deletions server/testcases/alter_col_nullable.json

This file was deleted.

Loading