Skip to content

Commit bdca07c

Browse files
committed
remove bq, add postgres setup
1 parent 05042c9 commit bdca07c

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/ci.yml

+19-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,25 @@ jobs:
8989
- name: Start PostgreSQL
9090
if: matrix.adapter == 'postgres'
9191
run: |
92-
sudo systemctl start postgresql.service
93-
pg_isready
94-
sudo -u postgres createuser -s -d -r -w ${{ vars.POSTGRES_USER }}
95-
92+
# initdb requires file for password in non-interactive mode
93+
export PWFILE="$RUNNER_TEMP/pwfile"
94+
echo "postgres" > $PWFILE
95+
initdb --pgdata="$PGDATA" --username="postgres" --pwfile="$PWFILE"
96+
97+
echo "Starting PostgreSQL..."
98+
echo "unix_socket_directories = '$PGHOST'" >> "$PGDATA/postgresql.conf"
99+
pg_ctl start
100+
101+
echo "Creating user..."
102+
psql --host "$PGHOST" --username="postgres" --dbname="postgres" --command="CREATE USER $PGUSERNAME PASSWORD '$PGPASSWORD'" --command="\du"
103+
104+
echo "Creating database..."
105+
createdb --owner="$PGUSERNAME" --username="postgres" "$PGDATABASE"
106+
env:
107+
PGHOST: ${{ vars.POSTGRES_HOST }}
108+
PGDATABASE: ${{ vars.POSTGRES_DATABASE }}
109+
PGUSERNAME: ${{ vars.POSTGRES_USER }}
110+
PGPASSWORD: ${{ secrets.POSTGRES_PASS }}
96111

97112
- name: "Install ${{ matrix.adapter }}"
98113
run: |

integration_tests/.env/bigquery.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON=
2-
BIGQUERY_PROJECTs=
2+
BIGQUERY_PROJECT=
33
BIGQUERY_SCHEMA=dbt_utils_integration_tests_bigquery

supported_adapters.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SUPPORTED_ADAPTERS=postgres,snowflake,redshift,bigquery
1+
SUPPORTED_ADAPTERS=postgres,snowflake,redshift

0 commit comments

Comments
 (0)