Skip to content

Update dependency prettier to v3.8.3 #4557

Update dependency prettier to v3.8.3

Update dependency prettier to v3.8.3 #4557

name: 'CI build & test'
on:
push:
branches: '*'
pull_request:
branches: '*'
permissions: read-all
jobs:
verify-formatting:
name: Verify code formatting
permissions:
contents: read
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
uses: actions/setup-node@v4
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
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
uses: actions/setup-node@v4
with:
node-version: '24.x'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build project
run: yarn build-only
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.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]
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
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@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # master
with:
name: dist
path: dist/
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 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]
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 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
# Blacksmith is much faster and gives better dashboards than github actions, but we are not being sponsored anymore so had to revert.
# runs-on: blacksmith-4vcpu-ubuntu-2204
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Get changed files
id: detect-changes
uses: tj-actions/changed-files@v47.0.5
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)