Skip to content

SW-1284 Updated Social Services Capacity and Demand #2535

SW-1284 Updated Social Services Capacity and Demand

SW-1284 Updated Social Services Capacity and Demand #2535

Workflow file for this run

# 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: Node.js CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
services:
# postgres config should match the env vars set in test/helpers/jest-setup.ts
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: statswales-backend-test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5433:5432
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# Cache the DuckDB extension dir so the postgres extension installed in global-setup is
# restored offline on subsequent runs. Keyed on the lockfile so a DuckDB version bump busts it.
- name: Cache DuckDB extensions
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.duckdb
key: duckdb-ext-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
duckdb-ext-${{ runner.os }}-
- run: npm ci
- run: npm run prettier:ci
- run: npm run lint:ci
- run: npm run build
- run: npm run test:ci
env:
LOG_LEVEL: error