mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
6b3db83737
server/bigquery: run tests in CI #1525 [Example of successful BigQuery test job](https://app.circleci.com/pipelines/github/hasura/graphql-engine-mono/15951/workflows/86deb614-ddbc-4df5-9af3-288eeff6504a/jobs/283568) TODO: - [ ] I'll make corresponding changes in the OSS repo once this is merged - [ ] @scriptnull or anyone with permissions: to require in CI https://github.com/hasura/graphql-engine-mono/pull/1741 GitOrigin-RevId: d4ba446e9b13d213de135c73bb72973478575a29
57 lines
869 B
Bash
57 lines
869 B
Bash
#!/usr/bin/env bash
|
|
PARAMS=""
|
|
BACKEND="${BACKEND:-postgres}"
|
|
|
|
die_backends() {
|
|
cat <<EOL
|
|
Invalid --backend argument. Available backends:
|
|
postgres (default)
|
|
bigquery
|
|
citus
|
|
mssql
|
|
mysql
|
|
|
|
EOL
|
|
exit 1
|
|
}
|
|
|
|
while (( "$#" )); do
|
|
case "$1" in
|
|
--backend)
|
|
if [ -n "$2" ] && [ "${2:0:1}" != "-" ]; then
|
|
BACKEND=$2
|
|
shift 2
|
|
fi
|
|
;;
|
|
*) # preserve positional arguments
|
|
PARAMS="$PARAMS $1"
|
|
shift
|
|
;;
|
|
esac
|
|
done
|
|
|
|
# validate backend argument
|
|
case "$BACKEND" in
|
|
postgres)
|
|
;;
|
|
bigquery)
|
|
source "scripts/data-sources-util.sh"
|
|
|
|
verify_bigquery_pytest_env
|
|
export HASURA_BIGQUERY_SERVICE_ACCOUNT=$(cat "$HASURA_BIGQUERY_SERVICE_ACCOUNT_FILE")
|
|
;;
|
|
citus)
|
|
;;
|
|
mssql)
|
|
;;
|
|
mysql)
|
|
;;
|
|
*)
|
|
die_backends
|
|
;;
|
|
esac
|
|
|
|
# set positional arguments in their proper place
|
|
eval set -- "$PARAMS"
|
|
export BACKEND
|