ci: split lint and format into separate jobs

- Lint (oxlint) only runs when code changes are detected
- Format (oxfmt) runs on all PRs including docs-only changes
- Update path filter: pnpm-lock.yaml → bun.lock

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
James
2026-03-24 04:54:51 +00:00
co-authored by Claude Opus 4.6
parent 065de441b3
commit 039985b1fe
+17 -4
View File
@@ -26,8 +26,7 @@ jobs:
- "packages/**"
- "scripts/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "bun.lock"
- "tsconfig*.json"
- "Dockerfile*"
@@ -46,8 +45,10 @@ jobs:
- run: bun install --frozen-lockfile
- run: bun run build
lint-and-format:
name: Lint & Format
lint:
name: Lint
needs: changes
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
@@ -58,6 +59,18 @@ jobs:
node-version: 22
- run: bun install --frozen-lockfile
- run: bun run lint
format:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- uses: actions/setup-node@v4
with:
node-version: 22
- run: bun install --frozen-lockfile
- run: bun run format:check
typecheck: