Skip to content

chore: add patch changeset for perstack and create-expert (#489) #1213

chore: add patch changeset for perstack and create-expert (#489)

chore: add patch changeset for perstack and create-expert (#489) #1213

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CI: "true"
PNPM_VERSION: "10.10.0"
NODE_VERSION: "22"
jobs:
lint:
name: Lint / Format
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint & Format check
run: pnpm run format-and-lint
typecheck:
name: Type Check
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Restore turbo cache
uses: actions/cache@v4
with:
path: .turbo
key: turbo-typecheck-${{ runner.os }}-${{ hashFiles('**/*.[tj]s', '**/*.[tj]sx', 'pnpm-lock.yaml') }}
restore-keys: |
turbo-typecheck-${{ runner.os }}-
- name: Type check
run: pnpm run typecheck
check-deps:
name: Check Dependencies
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check unused dependencies
run: pnpm run check-deps
validate-versions:
name: Validate Versions
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Validate version sync
run: pnpm run validate:versions
validate-changeset:
name: Validate Changeset
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Validate changesets
run: pnpm run validate:changeset
check-schema-diff:
name: Check Schema Diff
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check schema diff
run: pnpm run check:schema-diff
test:
name: Test
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Prepare test environment
run: pnpm run reset
- name: Run tests with coverage
run: pnpm test
build:
name: Build
runs-on: ubuntu-24.04
if: github.event_name == 'push' || github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Restore turbo cache
uses: actions/cache@v4
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ hashFiles('**/*.[tj]s', '**/*.[tj]sx', 'pnpm-lock.yaml') }}
restore-keys: |
turbo-${{ runner.os }}-
- name: Build all packages
run: pnpm run build
env:
NODE_ENV: production
changeset-check:
name: Changeset Check
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request' && github.event.pull_request.draft == false && !startsWith(github.head_ref, 'dependabot/') && !startsWith(github.head_ref, 'changeset-release/')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check if package source code changed
id: check_files
run: |
PACKAGE_CHANGES=$(git diff --name-only origin/main...HEAD -- apps/ packages/ | grep -v '\.md$' || true)
if [ -z "$PACKAGE_CHANGES" ]; then
echo "needs_changeset=false" >> "$GITHUB_OUTPUT"
echo "No package source changes — skipping changeset check"
else
echo "needs_changeset=true" >> "$GITHUB_OUTPUT"
fi
- name: Setup pnpm
if: steps.check_files.outputs.needs_changeset == 'true'
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
if: steps.check_files.outputs.needs_changeset == 'true'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
- name: Install dependencies
if: steps.check_files.outputs.needs_changeset == 'true'
run: pnpm install --frozen-lockfile
- name: Check changeset
if: steps.check_files.outputs.needs_changeset == 'true'
run: pnpm changeset status --since=origin/main