-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (113 loc) · 3.57 KB
/
Copy pathci.yml
File metadata and controls
120 lines (113 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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 release, 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 }}