diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de85e14..812bce6e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -89,10 +89,25 @@ jobs: - name: Start PostgreSQL if: matrix.adapter == 'postgres' run: | - sudo systemctl start postgresql.service - pg_isready - sudo -u postgres createuser -s -d -r -w ${{ vars.POSTGRES_USER }} - + # initdb requires file for password in non-interactive mode + export PWFILE="$RUNNER_TEMP/pwfile" + echo "postgres" > $PWFILE + initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE" + + echo "Starting PostgreSQL..." + echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf" + pg_ctl start + + echo "Creating user..." + psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du" + + echo "Creating database..." + createdb --owner="$PGUSERNAME" --username="postgres" "$PGDATABASE" + env: + PGHOST: ${{ vars.POSTGRES_HOST }} + PGDATABASE: ${{ vars.POSTGRES_DATABASE }} + PGUSERNAME: ${{ vars.POSTGRES_USER }} + PGPASSWORD: ${{ secrets.POSTGRES_PASS }} - name: "Install ${{ matrix.adapter }}" run: | diff --git a/integration_tests/.env/bigquery.env b/integration_tests/.env/bigquery.env index 6cc1a9b4..932cd313 100644 --- a/integration_tests/.env/bigquery.env +++ b/integration_tests/.env/bigquery.env @@ -1,3 +1,3 @@ DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON= -BIGQUERY_PROJECTs= +BIGQUERY_PROJECT= BIGQUERY_SCHEMA=dbt_utils_integration_tests_bigquery \ No newline at end of file diff --git a/supported_adapters.env b/supported_adapters.env index 3acc8a8b..7e734380 100755 --- a/supported_adapters.env +++ b/supported_adapters.env @@ -1 +1 @@ -SUPPORTED_ADAPTERS=postgres,snowflake,redshift,bigquery +SUPPORTED_ADAPTERS=postgres,snowflake,redshift