# CI Filter Patterns - See FILTERS.md for documentation
#
# Filters that trigger CI jobs:
#   core     -> dynamo build-test, all backend builds (vllm/sglang/trtllm)
#   operator -> operator build and test
#   deploy   -> deploy tests
#   planner  -> dynamo build-test
#   vllm     -> vllm build and test
#   sglang   -> sglang build and test
#   trtllm   -> trtllm build and test
#   frontend -> frontend EPP image build, dynamo build-test
#   docs     -> fern docs lint, sync, and version release (docs/ directory)
#
# Filters for coverage only (no CI triggered):
#   examples, ignore

all:
  - '**'

docs:
  - 'docs/**'
  - 'fern/**'
  - '.github/workflows/fern-docs.yml'
  - '**/*.md'
  - '**/*.txt'
  - '**/.gitignore'
  - '**/.helmignore'
  - '**/.gitattributes'
  - 'LICENSE'
  - 'CODEOWNERS'

examples:
  - 'recipes/**'
  - 'examples/**'
  - 'benchmarks/**'
  - '.devcontainer/**'
  - 'deploy/discovery/**'
  - 'deploy/inference-gateway/**'
  - 'deploy/observability/**'
  - 'deploy/pre-deployment/**'

ignore:
  - '.lycheeignore'
  - '.pre-commit-config.yaml'
  - '.coderabbit.yaml'
  - '.clang-format'
  - 'dynamo.code-workspace'
  - 'deploy/*'
  - '.github/scripts/**'
  - '.github/ISSUE_TEMPLATE/**'
  - '.github/pull_request_template.md'
  - '.github/labeler.yml'
  - '.github/release.yml'
  - '.github/copy-pr-bot.yaml'
  - '.github/dco.yml'
  - '.github/allurerc.mjs'
  - 'container/Dockerfile.docs'
  - 'container/run.sh'
  - 'container/use-sccache.sh'
  - 'container/dev/**'
  - 'container/templates/aws.Dockerfile'
  - 'container/templates/local_dev.Dockerfile'
  - 'container/templates/dev.Dockerfile'

ci: &ci
  - '.github/workflows/**'
  - '.github/filters.yaml'
  - '.github/actions/**'
  - '.github/scripts/parse_buildkit_output.py'
  - '.github/scripts/route_buildkit.sh'
  - 'container/Dockerfile.test'

core:
  # Exclude documentation files first, then include patterns override for specific paths
  - '!**/*.md'
  - '!**/*.rst'
  - '!**/*.txt'
  - *ci
  - 'container/render.py'
  - 'container/Dockerfile.template'
  - 'container/context.yaml'
  - 'container/templates/args.Dockerfile'
  - 'container/templates/dynamo_*'
  - 'container/templates/wheel_builder.Dockerfile'
  - '.dockerignore'
  - 'container/deps/*'
  - 'container/compliance/**'
  - '.cargo/config.toml'
  - 'lib/**'
  - 'tests/**'
  - 'components/src/dynamo/router/**'
  - 'components/src/dynamo/mocker/**'
  - 'components/src/dynamo/frontend/**'
  - 'components/src/dynamo/common/**'
  - 'components/src/dynamo/gpu_memory_service/**'
  - '*.toml'
  - '*.lock'
  - '*.py'
  - '*.rs'
  - 'scripts/report_pytest_markers.py'

operator:
  - *ci
  - 'deploy/operator/**'
  - 'deploy/operator/.*'
  - 'docs/kubernetes/api-reference.md'
  - 'deploy/helm/charts/platform/**'
  - 'components/src/dynamo/profiler/utils/dgdr_*'

deploy:
  - '!**/*.md'
  - '!**/*.rst'
  - *ci
  - 'deploy/helm/**'
  - 'deploy/utils/**'
  - 'deploy/snapshot/**'
  - 'tests/deploy/**'

planner:
  - 'container/templates/planner.Dockerfile'
  - 'components/src/dynamo/planner/**'
  - 'components/src/dynamo/global_planner/**'
  - 'components/src/dynamo/profiler/**'
  - 'components/src/dynamo/global_router/**'

vllm:
  - '!**/*.md'
  - '!**/*.rst'
  - 'container/deps/requirements.vllm.txt'
  - 'container/deps/vllm/**'
  - 'examples/backends/vllm/**'
  - 'components/src/dynamo/vllm/**'
  - 'container/templates/vllm_*'

sglang:
  - '!**/*.md'
  - '!**/*.rst'
  - 'examples/backends/sglang/**'
  - 'components/src/dynamo/sglang/**'
  - 'container/templates/sglang_*'

trtllm:
  - '!**/*.md'
  - '!**/*.rst'
  - 'container/deps/trtllm/**'
  - 'examples/backends/trtllm/**'
  - 'components/src/dynamo/trtllm/**'
  - 'container/build_trtllm_wheel.sh'
  - 'container/templates/trtllm_*'

frontend:
  - '!**/*.md'
  - '!**/*.rst'
  - *ci
  - '.cargo/config.toml'
  - 'lib/**'
  - '*.toml'
  - '*.lock'
  - 'container/deps/*'
  - 'container/compliance/**'
  - 'components/src/dynamo/router/**'
  - 'components/src/dynamo/mocker/**'
  - 'components/src/dynamo/frontend/**'
  - 'components/src/dynamo/common/**'
  - 'deploy/inference-gateway/**'
  - 'container/templates/frontend.Dockerfile'

rust:
  - '.github/workflows/pre-merge.yml'
  - '**/*.rs'
  - '**/Cargo.toml'
  - '**/Cargo.lock'
  - 'deny.toml'
