Skip to content

ci: split tests into 4 shards with fail-fast disabled#1215

Closed
yanyihan-xiaomi wants to merge 16 commits into
mainfrom
exp/test-4-shards
Closed

ci: split tests into 4 shards with fail-fast disabled#1215
yanyihan-xiaomi wants to merge 16 commits into
mainfrom
exp/test-4-shards

Conversation

@yanyihan-xiaomi

@yanyihan-xiaomi yanyihan-xiaomi commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Split unit tests into 4 parallel shards using bun test --shard
  • Set fail-fast: false so all shards run to completion even if one fails
  • Run tests directly in packages/opencode instead of via turbo
  • Remove @mimo-ai/cli and @mimo-ai/app test tasks from turbo.json (only TUI is actively developed)
  • turbo.json only keeps typecheck
  • Pin bun to 1.3.14 via packageManager field
  • Upload JUnit XML artifact per shard (if: always())
  • Bump actions: checkout@v6, cache@v5, upload-artifact@v7 (fix Node.js 20 deprecation warnings)
  • Remove RUNNER_ARCH guard in setup-bun (CI is ubuntu-only)

Current status

  • Sharding works correctly: 4 independent shards, fail-fast disabled confirmed
  • Shard 3/4 passes fully
  • 21 pre-existing test failures across shards 1/2/4 (unrelated to this PR):
    • Shard 1: 9 fail (History.backfill, lsp.spawn, MCP server, Worktree ×2, rebuild context ×2, bash permissions ×2)
    • Shard 2: 2 fail (Project.fromDirectory, rebuild context visual verify)
    • Shard 4: 10 fail (Actor.spawn, plugin specs ×3, migrateFromGlobal, SessionCheckpoint, CheckpointContext, parentSessionID, Instruction.system ×2)

Test plan

  • Verify all 4 shards start and run independently
  • Verify a failing shard does not cancel other shards
  • JUnit artifacts uploaded per shard

- Use bun test --shard directly in packages/opencode instead of turbo
- Run 4 parallel shards with fail-fast: false so all shards complete
- Remove @mimo-ai/cli and @mimo-ai/app test tasks from turbo.json
- Keep turbo for typecheck and build only
@yanyihan-xiaomi yanyihan-xiaomi self-assigned this Jun 22, 2026
- Restore git identity for husky compatibility
- Switch to test:ci script with JUnit reporter + upload artifact per shard
- Bump actions/checkout to v6, actions/cache to v5, upload-artifact to v7
- Remove RUNNER_ARCH guard in setup-bun (only ubuntu CI for now)
- Simplify setup-bun action: remove baseline URL, setuptools, Windows hoisted
- Bump actions: checkout@v6, cache@v5, upload-artifact@v7
- Test workflow: 4 shards, fail-fast=false, 8min timeout, JUnit artifacts
- turbo.json: only keep typecheck (remove build + cli/app test tasks)
- package.json: bump bun to 1.3.14
@yanyihan-xiaomi yanyihan-xiaomi marked this pull request as ready for review June 22, 2026 16:33
@yanyihan-xiaomi yanyihan-xiaomi marked this pull request as draft June 23, 2026 04:44
@yanyihan-xiaomi yanyihan-xiaomi removed their assignment Jun 23, 2026
@yanyihan-xiaomi

Copy link
Copy Markdown
Collaborator Author

Superseded by #1236

@yanyihan-xiaomi yanyihan-xiaomi deleted the exp/test-4-shards branch June 23, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant