Skip to content

Improve error handling for INSERT VALUES with multi-column subqueries… #4202

Improve error handling for INSERT VALUES with multi-column subqueries…

Improve error handling for INSERT VALUES with multi-column subqueries… #4202

name: 'CI build & test'
on:
push:
branches: '*'
pull_request:
branches: '*'
permissions: read-all
jobs:
verify-formatting:
name: Verify code formatting
permissions:
contents: read
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Node
uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
with:
node-version: '24.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Verify formatting
run: yarn test-format-all
build:
name: Build from source files
needs: []
permissions:
contents: write
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Node
uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
with:
node-version: '24.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn build-only
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: dist
path: dist/
- name: Package node_modules
run: tar --exclude='.cache' -cvf node_modules.tar node_modules
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: node_modules
path: node_modules.tar
test-suite-node:
name: Test suite for Node
permissions:
contents: read
needs: [build, verify-formatting]
runs-on: blacksmith-4vcpu-ubuntu-2204
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x, 24.x] # Dropped '23.x' (EOL) and 'latest' for stability
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup Node
uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # master
with:
name: dist
path: dist/
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # master
with:
name: node_modules
path: ./
- name: Unpack node_modules
run: tar -xvf node_modules.tar
- name: Run test suite
run: yarn test-only
test-suite-browser:
name: Test suite for Browser
permissions:
contents: read
needs: [build, verify-formatting]
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # master
with:
name: dist
path: dist/
- name: Placeholder for browser tests
run: echo '::warning ::Not able to automate browser tests yet'
- name: Run browser tests (disabled)
run: '# yarn test-browser-ci'
verify-parser:
name: Verify grammar vs generated parser
needs: []
permissions:
contents: read
runs-on: blacksmith-4vcpu-ubuntu-2204
steps:
- name: Harden Runner
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Get changed files
id: detect-changes
uses: tj-actions/[email protected]
with:
files: src/alasqlparser.jison
- name: Build from src
# This step only runs if the jison file changed
if: steps.detect-changes.outputs.any_changed == 'true'
run: |
yarn install --frozen-lockfile
yarn jison
yarn test
- name: Check generated parser for changes
if: steps.detect-changes.outputs.any_changed == 'true'
run: |
git diff --exit-code -- src/alasqlparser.js || (echo "Please run 'yarn jison && yarn test' and commit again." && exit 1)