Skip to content

Commit

Permalink
Postgres action (#1659)
Browse files Browse the repository at this point in the history
Postgres action
  • Loading branch information
Will Scullin authored Mar 14, 2024
1 parent 30e246b commit 269fad7
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/db-motherduck.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: MotherDuck
name: MotherDuck DB

on: [push]

jobs:
build:
test-motherduck:
runs-on: ubuntu-latest

strategy:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/db-postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Postgres DB

on: [push]

jobs:
# Label of the container job
test-postgres:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

services:
postgres:
image: postgres
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci --loglevel error
npm run build
echo CREATE EXTENSION tsm_system_rows\; | psql
gunzip -c test/data/postgres/malloytest-postgres.sql.gz | psql
npm run test-silent
env:
MALLOY_DATABASES: postgres
PGHOST: localhost
PGPORT: 5432
PGUSER: root
PGPASSWORD: postgres
4 changes: 2 additions & 2 deletions .github/workflows/db-snowflake.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Snowflake DB (Non-blocking)
name: Snowflake DB

on: [push]

jobs:
build:
test-snowflake:
runs-on: ubuntu-latest

strategy:
Expand Down
4 changes: 3 additions & 1 deletion cloudbuild/build-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ nix-shell \
--command "$(cat <<NIXCMD
set -euxo pipefail
npm ci --loglevel error
export MALLOY_DATABASES=postgres,bigquery,duckdb,duckdb_wasm
export MALLOY_DATABASES=bigquery,duckdb,duckdb_wasm
npm run lint
npm run build
npm run build-duckdb-db
npm run test-silent
export MALLOY_DATABASES=bigquery,postgres
npm run test-silent -- -- test/src/databases/bigquery-postgres/multi_connection.spec.ts
NIXCMD
)"

0 comments on commit 269fad7

Please sign in to comment.