Skip to content

Merge pull request #7 from nestm-dev/agent/harness-orchestration #17

Merge pull request #7 from nestm-dev/agent/harness-orchestration

Merge pull request #7 from nestm-dev/agent/harness-orchestration #17

Workflow file for this run

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@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
- run: pnpm run check
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
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@v4
with: { name: dist, path: dist }
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["22.12.0", "24"]
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with: { node-version: 24, cache: pnpm }
- run: pnpm install --frozen-lockfile
# pnpm 11.18 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@v5
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@v5
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with: { node-version: 24, cache: pnpm }
- run: pnpm install --no-frozen-lockfile
- run: ${{ matrix.command }}
npm-peer-smoke:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/setup-node@v5
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 prerelease sibling peers appear fixed — review pnpm-workspace.yaml, README, and the example workaround."
else
echo "npm ERESOLVE remains present while Nest prereleases declare stale sibling peers."
fi