Skip to content

Commit

Permalink
remove bq, add postgres setup
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed Jul 9, 2024
1 parent 05042c9 commit bdca07c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/.env/bigquery.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
DBT_ENV_SECRET_BIGQUERY_KEYFILE_JSON=
BIGQUERY_PROJECTs=
BIGQUERY_PROJECT=
BIGQUERY_SCHEMA=dbt_utils_integration_tests_bigquery
2 changes: 1 addition & 1 deletion supported_adapters.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUPPORTED_ADAPTERS=postgres,snowflake,redshift,bigquery
SUPPORTED_ADAPTERS=postgres,snowflake,redshift

0 comments on commit bdca07c

Please sign in to comment.