Create a Docker image specifically for running the Python tests.

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: https://github.com/hasura/graphql-engine-mono/pull/5761
GitOrigin-RevId: d57b4a5ace050861e516dd79a4a38ff4844d4093
This commit is contained in:
Samir Talwar 2022-09-07 16:27:54 +02:00 committed by hasura-bot
parent d43a30e8fc
commit 1b20bb55b5
2 changed files with 10 additions and 10 deletions

View File

@ -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"

8
.dockerignore Normal file
View File

@ -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