-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (139 loc) · 4.41 KB
/
Copy pathci.yml
File metadata and controls
147 lines (139 loc) · 4.41 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "17 8 * * 1"
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 check
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 exec attw --pack . --profile esm-only
- run: pnpm run example:build
- name: Verify public entry points and decorator metadata
run: node scripts/check-package.mjs
- uses: actions/upload-artifact@v7
with: { name: dist, path: dist }
control-plane:
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 build
- run: pnpm --filter @nestm/ai-sdk-control-plane-web run verify
playground:
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:playground
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["22.12.0", "24"]
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
# pnpm 11.20 requires Node >=22.13, while this package supports Node
# 22.12. Install with Node 24, then execute every test binary directly
# under the advertised runtime so pnpm cannot mask the compatibility floor.
- uses: actions/setup-node@v7
with:
node-version: "${{ matrix.node }}"
package-manager-cache: false
- name: Assert test runtime
env:
EXPECTED_NODE_VERSION: "${{ matrix.node }}"
run: |
node -e '
const actual = process.versions.node;
const expected = process.env.EXPECTED_NODE_VERSION;
const matches = expected.includes(".")
? actual === expected
: actual.split(".")[0] === expected;
if (!matches) {
throw new Error("Expected Node " + expected + ", received " + actual);
}
console.log("Testing with Node " + actual);
'
- name: Unit tests
run: node ./node_modules/vitest/vitest.mjs run --config vitest.config.ts
env: { CI: "true" }
- name: Express E2E tests
run: node ./node_modules/vitest/vitest.mjs run --config vitest.config.e2e.ts
env:
CI: "true"
TEST_HTTP_ADAPTER: express
- name: Fastify E2E tests
run: node ./node_modules/vitest/vitest.mjs run --config vitest.config.e2e.ts
env:
CI: "true"
TEST_HTTP_ADAPTER: fastify
- name: Type tests
run: node ./node_modules/typescript/bin/tsc -p tests/types/tsconfig.json
env: { CI: "true" }
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
- name: ai-snapshot
command: pnpm up ai@snapshot && pnpm run test
- name: harness-latest
command: node scripts/harness-candidate-canary.mjs
name: Canary (${{ matrix.name }})
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 }}