Skip to content

Conversation

@zhuravel
Copy link
Contributor

@zhuravel zhuravel commented Nov 6, 2025

Summary

Add support for multiple exclude patterns via --tests-exclude-glob option to allow excluding specific test files from the split. This option can be specified multiple times to exclude multiple patterns, matching the behavior of the --tests-glob option.

Motivation

I'm migrating from CircleCI to GitHub Actions and needed exclude pattern support similar to other test splitting tools:

  • Knapsack Pro supports KNAPSACK_PRO_TEST_FILE_EXCLUDE_PATTERN (docs)
  • split_tests (Go implementation) supports --exclude-glob pattern (repo)

I prefer split-test over the Go alternative, but the missing exclude pattern support was a blocker for my migration.

Usage Example

# Single exclude pattern
split-test --tests-glob 'spec/**/*_spec.rb' --tests-exclude-glob 'spec/system/**/*_spec.rb'

# Multiple exclude patterns
split-test --tests-glob 'spec/**/*_spec.rb' \
--tests-exclude-glob 'spec/system/**/*_spec.rb' \
--tests-exclude-glob 'spec/integration/**/*_spec.rb'

Disclosure

⚠️ Full disclosure: This code was generated with AI assistance (Claude Code). I have no prior Rust experience, so I would greatly appreciate a thorough review to ensure the implementation follows Rust best practices and project conventions.

@mtsmfm
Copy link
Owner

mtsmfm commented Nov 17, 2025

Thank you for sharing your motivation, it makes sense!

@mtsmfm mtsmfm merged commit b5f445b into mtsmfm:main Nov 17, 2025
12 checks passed
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.

2 participants