Skip to content

feat: set up nx workspace #118

feat: set up nx workspace

feat: set up nx workspace #118

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: sync 路 lint 路 typecheck 路 build 路 test (node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['20', '22']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: corepack enable
- run: pnpm install --frozen-lockfile
# fail fast if tsconfig project references drift from the graph
- run: pnpm run sync:check
- name: Start Nx Agents
run: >-
pnpm dlx nx@22.7.5 start-ci-run
--distribute-on="3 linux-medium-node${{ matrix.node }}"
--stop-agents-after=test
- run: pnpm run lint
- run: pnpm run typecheck
- run: pnpm run package
- run: pnpm run test
package-contract:
name: publint + attw
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: corepack enable
- run: pnpm install --frozen-lockfile
- run: pnpm run package
- run: pnpm run check:packages
# The main verify job runs against nestjs 11 (the installed version). This job
# certifies the lower bound of @automapper/nestjs's `^10 || ^11` peer range by
# downgrading the @nestjs runtime to v10 and running the DI integration specs.
nestjs-compat:
name: nestjs 10 compat
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: corepack enable
- run: pnpm install --frozen-lockfile
# downgrade only the @nestjs runtime; rxjs/reflect-metadata span both majors
- run: pnpm add -w @nestjs/common@^10 @nestjs/core@^10 @nestjs/testing@^10 @nestjs/platform-express@^10
- run: pnpm exec nx run integration-test:test