Skip to content

Bump the development-dependencies group across 1 directory with 2 updates #100

Bump the development-dependencies group across 1 directory with 2 updates

Bump the development-dependencies group across 1 directory with 2 updates #100

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Build and test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- name: Get libpg_query submodule hash
id: submodule
run:
echo hash=$(git submodule status packages/libpg-query-wasm/libpg_query
| awk '{print $1}') >> $GITHUB_OUTPUT
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "npm"
- name: Install Emscripten
uses: mymindstorm/setup-emsdk@v14
with:
version: "3.1.45"
actions-cache-folder: "emsdk-cache"
- run: npm ci
- name: Cache libpg_query build
uses: actions/cache@v4
with:
path: packages/libpg-query-wasm/libpg_query
key: libpg-query-${{ runner.os }}-${{ steps.submodule.outputs.hash }}
- run: npm run build
- run: npm run test:root
- uses: actions/upload-artifact@v4
with:
name: libpg-query-wasm
path: packages/libpg-query-wasm/dist
test:
needs: [build]
timeout-minutes: 10
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci
- uses: actions/download-artifact@v4
with:
name: libpg-query-wasm
path: packages/libpg-query-wasm/dist
- run: npm run test:workspaces