Skip to content

feat: add NestM auth control-plane services #52

feat: add NestM auth control-plane services

feat: add NestM auth control-plane services #52

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
install: false
- uses: actions/setup-node@v7
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run format:check
- run: pnpm run typecheck
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
install: false
- uses: actions/setup-node@v7
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm run verify:pack
- run: pnpm dlx @arethetypeswrong/cli --pack . --profile esm-only
# Guards the silent-decorator-metadata-loss class of bundler bug.
- run: |
node -e "
const source = require('node:fs').readFileSync('dist/index.mjs', 'utf8');
if (!source.includes('design:paramtypes')) {
throw new Error('decorator metadata missing from build output');
}
"
- uses: actions/upload-artifact@v7
with: { name: dist, path: dist }
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [22, 24]
adapter: [express, fastify]
steps:
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
install: false
- uses: actions/setup-node@v7
with: { node-version: "${{ matrix.node }}", cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm run test:${{ matrix.adapter }}
env: { CI: "true" }
# TypeORM adapter conformance: every flow run through both @better-auth/drizzle-adapter and
# ./typeorm against one committed DDL, then compared table by table. Runs in a NON-UTC zone
# (see tests/postgres/README.md) — on UTC the timezone class of bug is invisible.
postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:18-alpine
env:
POSTGRES_DB: nestm_better_auth
POSTGRES_USER: nestm
POSTGRES_PASSWORD: nestm
TZ: UTC
PGTZ: UTC
ports: ["55437:5432"]
options: >-
--health-cmd "pg_isready -U nestm -d nestm_better_auth"
--health-interval 2s --health-timeout 3s --health-retries 20
steps:
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
install: false
- uses: actions/setup-node@v7
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm run test:postgres
env:
PG_URL: postgresql://nestm:nestm@localhost:55437/nestm_better_auth
# Non-blocking early warnings: next Nest alpha, better-auth RC, Node current.
canary:
runs-on: ubuntu-latest
continue-on-error: true
if: github.event_name != 'pull_request'
strategy:
fail-fast: false
matrix:
include:
- name: nest-next
command: pnpm up "@nestjs/*@next" && pnpm run test:express
- name: better-auth-rc
command: pnpm up better-auth@rc && pnpm run test:express
steps:
- uses: actions/checkout@v7
- uses: pnpm/setup@v2
with:
install: false
- uses: actions/setup-node@v7
with: { node-version: 24, cache: pnpm }
- run: pnpm install --no-frozen-lockfile
- run: ${{ matrix.command }}
# Detects when the Nest 12 alphas fix their ^11 sibling peers: emits a
# warning annotation the day a plain `npm install` starts succeeding, so the
# ERESOLVE workarounds (pnpm-workspace.yaml, README, example) can be removed.
npm-peer-smoke:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/setup-node@v7
with: { node-version: 24 }
- run: |
mkdir smoke && cd smoke && npm init -y > /dev/null
if npm install @nestjs/common@next @nestjs/core@next @nestjs/platform-express@next reflect-metadata rxjs --no-audit --no-fund; then
echo "::warning::Nest 12 alpha sibling peers appear FIXED — remove the ERESOLVE workarounds (pnpm-workspace.yaml, README, examples/basic-express)."
else
echo "npm ERESOLVE still present (expected while Nest 12 alphas declare ^11 sibling peers)."
fi