Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .actrc

This file was deleted.

15 changes: 14 additions & 1 deletion .github/workflows/biome.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Biome
'on':
workflow_call: null
workflow_call:
inputs:
since:
description: Base commit to compare against. Empty runs everything.
type: string
default: ''
permissions:
contents: read
jobs:
Expand All @@ -10,8 +15,16 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup workspace
uses: ./.github/actions/setup
- name: Lint & format (biome ci)
if: inputs.since == ''
run: pnpm check:ci
- name: Lint & format changed files (biome ci)
if: inputs.since != ''
env:
SINCE: ${{ inputs.since }}
run: pnpm exec biome ci --changed --since="$SINCE" --no-errors-on-unmatched
timeout-minutes: 15
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,46 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changes:
name: Changes
runs-on: ubuntu-latest
outputs:
since: ${{ steps.filter.outputs.everything != 'true' && github.event.pull_request.base.sha || '' }}
steps:
- uses: actions/checkout@v6
- uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: filter
if: github.event_name == 'pull_request'
with:
token: ''
filters: |
everything:
- pnpm-lock.yaml
- biome.json
- 'tsconfig*.json'
- 'mcp-apps/tsconfig.json'
- 'vitest*.cts'
- '.github/**'
- package.json
timeout-minutes: 5
biome:
needs: changes
uses: ./.github/workflows/biome.yml
with:
since: ${{ needs.changes.outputs.since }}
typecheck:
uses: ./.github/workflows/typecheck.yml
test:
needs: changes
uses: ./.github/workflows/test.yml
with:
since: ${{ needs.changes.outputs.since }}
build:
uses: ./.github/workflows/build.yml
gate:
name: CI Gate
needs:
- changes
- biome
- typecheck
- test
Expand All @@ -42,6 +71,7 @@ jobs:
report-failure:
name: Open issue on main failure
needs:
- changes
- biome
- typecheck
- test
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Test
'on':
workflow_call: null
workflow_call:
inputs:
since:
description: Base commit to compare against. Empty runs everything.
type: string
default: ''
permissions:
contents: read
jobs:
Expand All @@ -10,10 +15,24 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup workspace
uses: ./.github/actions/setup
- name: Run integration tests
if: inputs.since == ''
run: pnpm test:integration
- name: Run unit tests with the coverage gate
if: inputs.since == ''
run: pnpm test:coverage
- name: Run integration tests for changed files
if: inputs.since != ''
env:
SINCE: ${{ inputs.since }}
run: pnpm exec vitest run --config vitest.integration.config.cts --changed "$SINCE"
- name: Run unit tests for changed files
if: inputs.since != ''
env:
SINCE: ${{ inputs.since }}
run: pnpm exec vitest run --changed "$SINCE"
timeout-minutes: 20
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ pnpm test && pnpm test:integration # Vitest unit + integration
pnpm build # Build to build/
```

To run the CI gate locally in Docker before pushing, use [act](https://nektosact.com): `act workflow_dispatch -W .github/workflows/ci.yml`. The root `.actrc` picks the runner image and keeps the pnpm store outside the workspace.
To run the CI gate locally in Docker before pushing, use [act](https://nektosact.com): `act workflow_dispatch -W .github/workflows/ci.yml`. The machine `~/.actrc` selects the runner, architecture and shared caches.

## Resources

Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
"vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "defaultBranch": "main" },
"files": {
"ignoreUnknown": true,
"includes": ["**"]
Expand Down
2 changes: 2 additions & 0 deletions mcp-apps/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"moduleResolution": "Bundler",
"jsx": "react-jsx",
"noEmit": true,
"incremental": true,
"tsBuildInfoFile": "../node_modules/.cache/tsc/mcp-apps.tsbuildinfo",
"verbatimModuleSyntax": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
"skills": "node build/scripts/skills.js",
"sync": "tsx src/scripts/devSync.ts",
"diagnose": "node build/scripts/diagnostics.js",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/src.tsbuildinfo",
"typecheck:mcp-apps": "tsc -p mcp-apps/tsconfig.json --noEmit",
"check": "tsc --noEmit && tsc -p mcp-apps/tsconfig.json --noEmit && biome check \"{src,mcp-apps}/**/*.{ts,tsx,js,json,md,css,html}\"",
"check": "pnpm run typecheck && pnpm run typecheck:mcp-apps && biome check \"{src,mcp-apps}/**/*.{ts,tsx,js,json,md,css,html}\"",
"check:ci": "biome ci .",
"verify": "pnpm run check:ci && pnpm run typecheck && pnpm run typecheck:mcp-apps && pnpm run test && pnpm run build",
"fix": "biome check --write --no-errors-on-unmatched --files-ignore-unknown=true \"{src,mcp-apps}/**/*.{ts,tsx,js,json,md,css,html}\"",
Expand Down
Loading