Skip to content

Commit

Permalink
Create a Docker image specifically for running the Python tests.
Browse files Browse the repository at this point in the history
This separates out the dependencies from the server builder.

I am using Python 3.9 as it has improved support for type annotations, which I would like to use.

PR-URL: hasura/graphql-engine-mono#5761
GitOrigin-RevId: d57b4a5ace050861e516dd79a4a38ff4844d4093
  • Loading branch information
SamirTalwar authored and hasura-bot committed Sep 7, 2022
1 parent d43a30e commit 1b20bb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .circleci/test-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,8 @@ done
echo -e "\nINFO: GraphQL Executable : $GRAPHQL_ENGINE"
echo -e "INFO: Logs Folder : $OUTPUT_FOLDER\n"

# This seems to flake out relatively often; try a mirror if so.
# Might also need to disable ipv6 or use a longer --timeout

# cryptography 3.4.7 version requires Rust dependencies by default. But we don't need them for our tests, hence disabling them via the following env var => https://stackoverflow.com/a/66334084
export CRYPTOGRAPHY_DONT_BUILD_RUST=1

pip3 install -r requirements.txt ||
pip3 install -i http://mirrors.digitalocean.com/pypi/web/simple --trusted-host mirrors.digitalocean.com -r requirements.txt

npm_config_loglevel=error npm ci
# Copy the node_modules directory installed in the Docker image here.
cp -R /deps/node_modules .

export EVENT_WEBHOOK_HEADER="MyEnvValue"

Expand Down
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/.direnv
/.git
/console/node_modules
/dist-newstyle
/server/tests-py/.hasura-dev-python-venv
/server/tests-py/.pytest-cache
/server/tests-py/__pycache__
/server/tests-py/node_modules

0 comments on commit 1b20bb5

Please sign in to comment.