Skip to content

RFC: Modernize the monorepo (ESM-only, TypeScript, pnpm, vitest, Node 22+) #1815

RFC: Modernize the monorepo (ESM-only, TypeScript, pnpm, vitest, Node 22+)

RFC: Modernize the monorepo (ESM-only, TypeScript, pnpm, vitest, Node 22+) #1815

Workflow file for this run

name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
lint:
name: Lint & Typecheck
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: pnpm
- name: πŸ“¦ Install
run: pnpm install --frozen-lockfile
- name: πŸš€ Build
run: pnpm build
- name: πŸ‘€ Lint
run: pnpm lint
- name: πŸ” Typecheck
run: pnpm typecheck
build:
name: Test (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 20
needs: lint
services:
postgres:
image: ghcr.io/railwayapp-templates/postgres-ssl
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: 'md5'
POSTGRES_DB: ci_db_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
fail-fast: false
matrix:
node: ['22', '24']
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: localhost
PGDATABASE: ci_db_test
PGTESTNOSSL: 'true'
SCRAM_TEST_PGUSER: scram_test
SCRAM_TEST_PGPASSWORD: test4scram
steps:
- run: |
psql \
-c "SET password_encryption = 'scram-sha-256'" \
-c "CREATE ROLE scram_test LOGIN PASSWORD 'test4scram'"
- uses: actions/checkout@v5
- run: corepack enable
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: πŸ“¦ Install libpq headers (for pg-native)
run: sudo apt-get update && sudo apt-get install -y libpq-dev
- run: pnpm install --frozen-lockfile
- name: πŸ”¨ Rebuild native modules (pg-native via libpq)
run: pnpm rebuild libpq
- name: πŸš€ Build
run: pnpm build
- name: πŸ§ͺ Test
run: pnpm -r --workspace-concurrency=1 --filter "./packages/**" run test