Skip to content

Commit 269fad7

Browse files
author
Will Scullin
authored
Postgres action (#1659)
Postgres action
1 parent 30e246b commit 269fad7

File tree

4 files changed

+55
-5
lines changed

4 files changed

+55
-5
lines changed

.github/workflows/db-motherduck.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: MotherDuck
1+
name: MotherDuck DB
22

33
on: [push]
44

55
jobs:
6-
build:
6+
test-motherduck:
77
runs-on: ubuntu-latest
88

99
strategy:

.github/workflows/db-postgres.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Postgres DB
2+
3+
on: [push]
4+
5+
jobs:
6+
# Label of the container job
7+
test-postgres:
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
node-version: [18.x]
13+
14+
services:
15+
postgres:
16+
image: postgres
17+
env:
18+
POSTGRES_USER: root
19+
POSTGRES_PASSWORD: postgres
20+
options: >-
21+
--health-cmd pg_isready
22+
--health-interval 10s
23+
--health-timeout 5s
24+
--health-retries 5
25+
ports:
26+
- 5432:5432
27+
28+
steps:
29+
- uses: actions/checkout@v4
30+
with:
31+
submodules: 'true'
32+
- name: Use Node.js ${{ matrix.node-version }}
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: ${{ matrix.node-version }}
36+
- name: npm install, build, and test
37+
run: |
38+
npm ci --loglevel error
39+
npm run build
40+
echo CREATE EXTENSION tsm_system_rows\; | psql
41+
gunzip -c test/data/postgres/malloytest-postgres.sql.gz | psql
42+
npm run test-silent
43+
env:
44+
MALLOY_DATABASES: postgres
45+
PGHOST: localhost
46+
PGPORT: 5432
47+
PGUSER: root
48+
PGPASSWORD: postgres

.github/workflows/db-snowflake.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Snowflake DB (Non-blocking)
1+
name: Snowflake DB
22

33
on: [push]
44

55
jobs:
6-
build:
6+
test-snowflake:
77
runs-on: ubuntu-latest
88

99
strategy:

cloudbuild/build-test/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ nix-shell \
1010
--command "$(cat <<NIXCMD
1111
set -euxo pipefail
1212
npm ci --loglevel error
13-
export MALLOY_DATABASES=postgres,bigquery,duckdb,duckdb_wasm
13+
export MALLOY_DATABASES=bigquery,duckdb,duckdb_wasm
1414
npm run lint
1515
npm run build
1616
npm run build-duckdb-db
1717
npm run test-silent
18+
export MALLOY_DATABASES=bigquery,postgres
19+
npm run test-silent -- -- test/src/databases/bigquery-postgres/multi_connection.spec.ts
1820
NIXCMD
1921
)"

0 commit comments

Comments
 (0)