Skip to content

feat: improve ci#14438

Merged
darkskygit merged 2 commits intocanaryfrom
darksky/improve-ci
Feb 14, 2026
Merged

feat: improve ci#14438
darkskygit merged 2 commits intocanaryfrom
darksky/improve-ci

Conversation

@darkskygit
Copy link
Member

@darkskygit darkskygit commented Feb 14, 2026

PR Dependency Tree

This tree was auto-generated by Charcoal

Summary by CodeRabbit

  • Chores
    • Refined PR trigger automation to run only on open/reopen/synchronize events
    • Split native CI into platform-specific builds (Linux, Windows, macOS) for more reliable pipelines
    • Added conditional Copilot test gating to run API/E2E tests only when relevant
    • Added conditional PR-title lint skip when edits don't change the title
    • Improved test result uploads and artifact handling for gated flows

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

Updates GitHub Actions workflows: narrows auto-labeler triggers, splits build-native into OS-specific jobs, adds Copilot test gating (filter + conditional API/E2E jobs), adjusts downstream dependencies and artifact uploads, and skips PR-title lint when title unchanged.

Changes

Cohort / File(s) Summary
Workflow trigger and lint tweaks
\.github/workflows/auto-labeler.yml, \.github/workflows/pr-title-lint.yml
Auto-labeler trigger restricted to opened, reopened, synchronize. PR title lint adds an if to skip when an edit doesn't change the title.
Build/test workflow restructuring
\.github/workflows/build-test.yml
Replaces build-native with build-native-linux, build-native-macos, build-native-windows; updates matrices and downstream needs to reference platform-specific jobs; removes desktop-bundle-check block.
Copilot test gating and artifacts
\.github/workflows/build-test.yml
Adds copilot-test-filter job that sets outputs based on path filters; introduces conditional copilot-api-test and copilot-e2e-test jobs gated by filter outputs; adds conditional test-result upload steps and wiring to other test flows.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant GH as GitHub Actions
participant Filter as copilot-test-filter
participant Build as build-native-*
participant API as copilot-api-test
participant E2E as copilot-e2e-test
participant Art as artifact upload

GH->>Build: trigger platform-specific builds (linux/macos/windows) rgba(100,150,240,0.5)
GH->>Filter: run path-based Copilot filter rgba(160,200,120,0.5)
Filter-->>GH: outputs (run_copilot_api?, run_copilot_e2e?) rgba(160,200,120,0.5)
GH-->>API: conditionally start copilot-api-test if output true rgba(240,160,120,0.5)
GH-->>E2E: conditionally start copilot-e2e-test if output true rgba(240,160,120,0.5)
API->>Art: upload test results (conditional) rgba(200,120,180,0.5)
E2E->>Art: upload test results (conditional) rgba(200,120,180,0.5)
Build->>Art: upload build/test artifacts rgba(200,120,180,0.5)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐇 I hopped through workflows, split the build with care,

Linux, Mac, and Windows now dance in the air,
A filter sniffed Copilot paths with cheer,
Tests run when needed, and artifacts appear,
— A rabbit’s CI jig, light-footed and clear ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title "feat: improve ci" is vague and generic, lacking specific details about what CI improvements are being made across the three workflow files. Consider using a more descriptive title that specifies the main improvements, such as "feat: add platform-specific native builds and copilot test gating" to better communicate the changeset scope.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into canary

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch darksky/improve-ci

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
.github/workflows/build-test.yml (1)

916-929: The decision step can be simplified by directly passing filter outputs.

The if/else blocks just echo the same boolean values that dorny/paths-filter already produces. You could wire the filter outputs directly in the job outputs: block and remove this step entirely.

♻️ Suggested simplification
   copilot-test-filter:
     name: Copilot test filter
     runs-on: ubuntu-latest
     outputs:
-      run-api: ${{ steps.decision.outputs.run_api }}
-      run-e2e: ${{ steps.decision.outputs.run_e2e }}
+      run-api: ${{ steps.copilot-filter.outputs.api }}
+      run-e2e: ${{ steps.copilot-filter.outputs.e2e }}
     steps:
       - uses: actions/checkout@v4
 
       - uses: dorny/paths-filter@v3
         id: copilot-filter
         with:
           filters: |
             api:
               - 'packages/backend/server/src/plugins/copilot/**'
               - 'packages/backend/server/tests/copilot.*'
             e2e:
               - 'packages/backend/server/src/plugins/copilot/**'
               - 'packages/backend/server/tests/copilot.*'
               - 'packages/frontend/core/src/blocksuite/ai/**'
               - 'packages/frontend/core/src/modules/workspace-indexer-embedding/**'
               - 'tests/affine-cloud-copilot/**'
-
-      - name: Decide test scope
-        id: decision
-        run: |
-          if [[ "${{ steps.copilot-filter.outputs.api }}" == "true" ]]; then
-            echo "run_api=true" >> "$GITHUB_OUTPUT"
-          else
-            echo "run_api=false" >> "$GITHUB_OUTPUT"
-          fi
-
-          if [[ "${{ steps.copilot-filter.outputs.e2e }}" == "true" ]]; then
-            echo "run_e2e=true" >> "$GITHUB_OUTPUT"
-          else
-            echo "run_e2e=false" >> "$GITHUB_OUTPUT"
-          fi

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/build-test.yml:
- Around line 895-947: The workflow references a missing script
./scripts/detect-blocksuite-update.mjs in the copilot-test-filter job (step id
check-blocksuite-update), causing the job to fail; fix by either adding the
missing detect-blocksuite-update.mjs implementing the intended blocksuite-update
detection (so the check-blocksuite-update step can set skip=true/false) or
remove the entire check-blocksuite-update step and related BASE_REF usage and
change the Decide test scope logic (the run_by_blocksuite condition) to rely
solely on the dorny/paths-filter output (step id copilot-filter) when setting
outputs run_api and run_e2e; update references to
steps.check-blocksuite-update.outputs.skip accordingly (e.g., delete that check)
so the workflow no longer calls the nonexistent script.
🧹 Nitpick comments (1)
.github/workflows/build-test.yml (1)

1178-1185: desktop-test now depends on all three native build jobs — test matrix entries will block on unrelated platforms.

For example, the Linux desktop test entry waits for build-native-windows and build-native-macos to complete even though it only downloads the Linux artifact. This negates some of the benefit of splitting the builds. If the Windows build is slow or flaky, it blocks all desktop tests.

Consider splitting this into per-platform desktop test jobs, or using a conditional needs pattern (not natively supported, but achievable via an intermediary "gate" job per platform).

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.72%. Comparing base (2b71b3f) to head (77281d9).
⚠️ Report is 1 commits behind head on canary.

Additional details and impacted files
@@             Coverage Diff             @@
##           canary   #14438       +/-   ##
===========================================
+ Coverage   40.25%   53.72%   +13.47%     
===========================================
  Files         491     2832     +2341     
  Lines       72769   153319    +80550     
  Branches      988    22926    +21938     
===========================================
+ Hits        29293    82378    +53085     
- Misses      43445    67555    +24110     
- Partials       31     3386     +3355     
Flag Coverage Δ
server-test 74.93% <ø> (+34.68%) ⬆️
unittest 33.51% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@darkskygit darkskygit merged commit 33bc3e2 into canary Feb 14, 2026
59 checks passed
@darkskygit darkskygit deleted the darksky/improve-ci branch February 14, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant