Skip to content

feat(typescript): add toggles to disable generated request/response/error/client options #8177

feat(typescript): add toggles to disable generated request/response/error/client options

feat(typescript): add toggles to disable generated request/response/error/client options #8177

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
node-version: ${{ steps.nvmrc.outputs.node-version }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- id: nvmrc
run: echo "node-version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
ci:
name: Build, Lint, Test
needs: setup
runs-on: ${{ matrix.os }}
env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TELEMETRY_DISABLED: 1
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
strategy:
matrix:
include:
# All Node versions on Ubuntu (fast, catches Node issues)
- os: ubuntu-latest
node-version: '22.13.0'
- os: ubuntu-latest
node-version: '24.14.0'
- os: ubuntu-latest
node-version: ${{ needs.setup.outputs.node-version }}
is-primary: true # Primary runner for examples/previews
# Latest Node on other OSes (catches platform issues)
- os: macos-latest
node-version: ${{ needs.setup.outputs.node-version }}
- os: windows-latest
node-version: ${{ needs.setup.outputs.node-version }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm tb "@hey-api/**"
- name: Check examples generated code
if: matrix.is-primary
run: pnpm examples:check
- name: Build examples
if: matrix.is-primary
run: pnpm tb "@example/**"
- name: Run linter
run: pnpm turbo run lint
- name: Run type check
run: pnpm ty "!@test/openapi-ts"
- name: Run type check (heavy tests)
run: pnpm ty "@test/openapi-ts"
- name: Run tests
run: pnpm test
- name: Publish preview packages
if: matrix.is-primary && github.event_name == 'pull_request'
run: ./scripts/publish-preview-packages.sh
env:
TURBO_SCM_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}