Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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" --passWithNoTests
- name: Run unit tests for changed files
if: inputs.since != ''
env:
SINCE: ${{ inputs.since }}
run: pnpm exec vitest run --changed "$SINCE" --passWithNoTests

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: --changed runs unit tests without collecting coverage, so ordinary PRs skip test:coverage and never enforce the configured coverage thresholds.

Assessment: 🟠 Major · 🔁 Occurrence: Often · 🏷️ Incomplete implementation

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** .github/workflows/test.yml
**Line:** 37:37
**Comment:**
	*Incomplete Implementation: `--changed` runs unit tests without collecting coverage, so ordinary PRs skip `test:coverage` and never enforce the configured coverage thresholds.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept as designed: the coverage thresholds are repo-wide, so a run limited to related tests cannot meet them. Any PR that touches shared config (lockfile, biome, tsconfig, vitest config, package.json, .github) and every push to main still runs the full suite with the coverage gate.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Customized review instruction saved!

Instruction:

Do not flag changed-file test runs for omitting repo-wide coverage when the full suite with coverage thresholds runs for shared-configuration changes and pushes to main.

Applied to:

  • .github/workflows/test.yml

💡 To manage or update this instruction, visit: CodeAnt AI Settings

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
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