Skip to content

Commit

Permalink
Merge branch 'main' into experimental-dialects
Browse files Browse the repository at this point in the history
  • Loading branch information
mtoy-googly-moogly committed Mar 18, 2024
2 parents 68367db + e5b62a0 commit 39e50b3
Show file tree
Hide file tree
Showing 66 changed files with 1,010 additions and 377 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/db-motherduck.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: MotherDuck DB

on: [push]

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

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

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
npm run test-silent
env:
CI: true
MALLOY_DATABASES: motherduck
MOTHERDUCK_TOKEN: ${{ secrets.MOTHERDUCK_TOKEN }}
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ demo/malloy-demo-composer/env
.env
test/data/duckdb/duckdb_test.db.wal
monospace.json
snowflake.log
15 changes: 6 additions & 9 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@
"tasks": [
{
"type": "typescript",
"tsconfig": "tsconfig.compile-no-emit.json",
"tsconfig": "packages/malloy/tsconfig.json",
"option": "watch",
"problemMatcher": ["$tsc-watch"],
"problemMatcher": [
"$tsc-watch"
],
"group": "build",
"label": "tsc-compile-watch",
"runOptions": { "runOn": "folderOpen" },
"presentation": {
"reveal": "silent",
"revealProblems": "onProblem",
"close": true
}
"label": "tsc: watch - packages/malloy/tsconfig.json",
"runOptions": { "runOn": "folderOpen" }
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Note: The Malloy VSCode Extension tracks a small amount of anonymous usage data.

## Join the Community

- Join our [**Malloy Slack Community!**](https://join.slack.com/t/malloy-community/shared_invite/zt-2crkkvo36-JNG6FM8cghRTyYmeS8hFBQ) Use this community to ask questions, meet other Malloy users, and share ideas with one another.
- Join our [**Malloy Slack Community!**](https://malloydata.github.io/slack) Use this community to ask questions, meet other Malloy users, and share ideas with one another.
- Use [**GitHub issues**](https://github.com/malloydata/malloy/issues) in this Repo to provide feedback, suggest improvements, report bugs, and start new discussions.

## Resources
Expand Down
3 changes: 3 additions & 0 deletions cloudbuild/build-test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ nix-shell \
--command "$(cat <<NIXCMD
set -euxo pipefail
npm ci --loglevel error
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
)"
2 changes: 1 addition & 1 deletion cloudbuild/deploy/malloy-npm-publish.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euxo pipefail

export PACKAGES="packages/malloy-interfaces packages/malloy packages/malloy-db-bigquery packages/malloy-db-duckdb packages/malloy-db-postgres packages/malloy-db-snowflake packages/malloy-render packages/malloy-malloy-sql test packages/malloy-syntax-highlight"
export PACKAGES="packages/malloy-interfaces packages/malloy packages/malloy-db-bigquery packages/malloy-db-duckdb packages/malloy-db-postgres packages/malloy-db-snowflake packages/malloy-db-trino packages/malloy-render packages/malloy-malloy-sql test packages/malloy-syntax-highlight"

nix-shell --pure --keep NPM_TOKEN --keep PACKAGES --command "$(cat <<NIXCMD
set -euxo pipefail
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild/deploy/malloy-npm-release-publish.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euxo pipefail

export PACKAGES="packages/malloy-interfaces packages/malloy packages/malloy-db-bigquery packages/malloy-db-duckdb packages/malloy-db-postgres packages/malloy-db-snowflake packages/malloy-render packages/malloy-malloy-sql test packages/malloy-syntax-highlight"
export PACKAGES="packages/malloy-interfaces packages/malloy packages/malloy-db-bigquery packages/malloy-db-duckdb packages/malloy-db-postgres packages/malloy-db-snowflake packages/malloy-db-trino packages/malloy-render packages/malloy-malloy-sql test packages/malloy-syntax-highlight"

nix-shell --pure --keep NPM_TOKEN --keep PACKAGES --keep BRANCH_NAME --command "$(cat <<NIXCMD
set -euxo pipefail
Expand Down
13 changes: 10 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@

process.env.TZ = 'America/Los_Angeles';

const transformIgnoreModules = [
'lit-html',
'lit-element',
'lit',
'@lit',
'@lit-labs',
'@motherduck/wasm-client',
].join('|');

module.exports = {
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
setupFilesAfterEnv: ['jest-expect-message'],
testMatch: ['**/?(*.)spec.(ts|js)?(x)'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/out/'],
transformIgnorePatterns: [
'node_modules/(?!(lit-html|lit-element|lit|@lit|@lit-labs)/)',
],
transformIgnorePatterns: [`node_modules/(?!(${transformIgnoreModules})/)`],
transform: {
'^.+\\.(ts|tsx)$': ['ts-jest', {tsconfig: '<rootDir>/tsconfig.json'}],
'^.+\\.(js|jsx)$': [
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useNx": false,
"version": "0.0.127",
"version": "0.0.132",
"command": {
"version": {
"allowBranch": "main"
Expand Down
Loading

0 comments on commit 39e50b3

Please sign in to comment.