Skip to content

fix(ci): build workspace dists in CI jobs; make fixtures machine-port… #123

fix(ci): build workspace dists in CI jobs; make fixtures machine-port…

fix(ci): build workspace dists in CI jobs; make fixtures machine-port… #123

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
build:
name: Build
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# tsup's DTS worker bundles a large entry graph for @converge/core;
# the default Node heap (~4 GB) tips over on a standard runner.
- run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=6144
typecheck:
name: Typecheck
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# Sibling packages resolve each other through workspace links whose
# "types" point at dist/ — build before checking.
- run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=6144
- run: pnpm typecheck
test:
name: Test
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# Integration tests spawn packages/cli/dist/index.js — build first.
- run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=6144
- run: pnpm test
- run: pnpm test:packages
format:
name: Format check
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm format:check
dead-code:
name: Dead code check
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.29.3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
# knip resolves workspace imports through built dist/ entry points.
- run: pnpm build
env:
NODE_OPTIONS: --max-old-space-size=6144
- run: pnpm dead-code:check