e30e75b5d4
Code Quality / Oxlint + Oxfmt (push) Waiting to run
Code Quality / Template Sync (push) Waiting to run
Code Quality / Build Changed Packages (push) Waiting to run
Code Quality / Test Changed Packages (push) Waiting to run
Deploy Expo Example / Deploy Production (push) Waiting to run
Deploy Ink Example / Deploy Production (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-stream, 3.12) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.10) (push) Waiting to run
Python Tests / pytest (assistant-ui-sync-server-api, 3.12) (push) Waiting to run
Deploy Shadcn Registry / Deploy Production (push) Waiting to run
Template Metrics / LOC + Bundle Size (push) Waiting to run
Changesets / Create Version PR (push) Has been cancelled
183 lines
5.9 KiB
YAML
183 lines
5.9 KiB
YAML
name: Code Quality
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "packages/**"
|
|
- "api-surface/**"
|
|
- "apps/**"
|
|
- "examples/**"
|
|
- "templates/**"
|
|
- "scripts/generate-api-surface.mjs"
|
|
- "scripts/check-api-surface.mjs"
|
|
- "scripts/lib/script-options.mjs"
|
|
- "scripts/sync-templates.sh"
|
|
- "turbo.json"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- ".github/workflows/code-quality.yaml"
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- "packages/**"
|
|
- "api-surface/**"
|
|
- "apps/**"
|
|
- "examples/**"
|
|
- "templates/**"
|
|
- "scripts/generate-api-surface.mjs"
|
|
- "scripts/check-api-surface.mjs"
|
|
- "scripts/lib/script-options.mjs"
|
|
- "scripts/sync-templates.sh"
|
|
- "turbo.json"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- ".github/workflows/code-quality.yaml"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
name: Oxlint + Oxfmt
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 5
|
|
steps:
|
|
- name: Checkout code repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # ratchet:pnpm/action-setup@v6.0.9
|
|
|
|
- name: Setup node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # ratchet:actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: "pnpm"
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run oxlint + oxfmt
|
|
run: pnpm lint
|
|
|
|
- name: Check resource memoization (React Compiler)
|
|
run: pnpm check:resource-memo
|
|
|
|
template-sync:
|
|
name: Template Sync
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 2
|
|
steps:
|
|
- name: Checkout code repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Verify templates match packages/ui source
|
|
run: bash scripts/sync-templates.sh
|
|
|
|
build:
|
|
name: Build Changed Packages
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout code repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # ratchet:pnpm/action-setup@v6.0.9
|
|
|
|
- name: Setup node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # ratchet:actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: "pnpm"
|
|
|
|
- name: Cache turbo build setup
|
|
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # ratchet:actions/cache@v5
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-build-${{ github.ref }}-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-build-${{ github.ref }}-
|
|
${{ runner.os }}-turbo-build-
|
|
${{ runner.os }}-turbo-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build packages
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
# PR: Build packages changed compared to base branch
|
|
pnpm turbo build --filter="...[origin/${{ github.base_ref }}]"
|
|
else
|
|
# Push to main: Build packages changed in last commit
|
|
pnpm turbo build --filter="...[HEAD^1]"
|
|
fi
|
|
|
|
- name: Check API surface
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
# PR: Check API surface for packages changed compared to base branch
|
|
pnpm run api-surface:check -- --skip-build --filter="...[origin/${{ github.base_ref }}]"
|
|
else
|
|
# Push to main: Check API surface for packages changed in last commit
|
|
pnpm run api-surface:check -- --skip-build --filter="...[HEAD^1]"
|
|
fi
|
|
|
|
- name: Test API surface generator
|
|
run: pnpm run api-surface:test
|
|
|
|
test:
|
|
name: Test Changed Packages
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 5
|
|
# Note: No dependency on 'build' job - Turbo handles test->build dependencies internally via dependsOn
|
|
steps:
|
|
- name: Checkout code repository
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # ratchet:actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # ratchet:pnpm/action-setup@v6.0.9
|
|
|
|
- name: Setup node.js
|
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # ratchet:actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
cache: "pnpm"
|
|
|
|
- name: Cache turbo build setup
|
|
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # ratchet:actions/cache@v5
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-test-${{ github.ref }}-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-test-${{ github.ref }}-
|
|
${{ runner.os }}-turbo-test-
|
|
${{ runner.os }}-turbo-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run tests
|
|
run: |
|
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
# PR: Test packages changed compared to base branch
|
|
pnpm turbo test --filter="...[origin/${{ github.base_ref }}]"
|
|
else
|
|
# Push to main: Test packages changed in last commit
|
|
pnpm turbo test --filter="...[HEAD^1]"
|
|
fi
|