This is an automated email from the ASF dual-hosted git repository.
github-merge-queue[bot] pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new a51712781b [Improve][CI] Run the seatunnel-cli Python test suite in CI
(#12300)
a51712781b is described below
commit a51712781b17b9982b8f288304508a31e3e27feb
Author: SEZ <[email protected]>
AuthorDate: Tue Sep 15 09:00:09 2026 +0000
[Improve][CI] Run the seatunnel-cli Python test suite in CI (#12300)
---
.github/workflows/cli.yml | 101 +++++++++++++++++++++++++++++++++++++++++++
seatunnel-cli/pyproject.toml | 11 ++++-
2 files changed, 111 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml
new file mode 100644
index 0000000000..a2bd852339
--- /dev/null
+++ b/.github/workflows/cli.yml
@@ -0,0 +1,101 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the 'License'); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an 'AS IS' BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: SeaTunnel CLI
+
+on:
+ push:
+ branches:
+ - dev
+ paths:
+ - 'seatunnel-cli/**'
+ - '.github/workflows/cli.yml'
+ pull_request:
+ paths:
+ - 'seatunnel-cli/**'
+ - '.github/workflows/cli.yml'
+
+permissions:
+ contents: read
+
+concurrency:
+ group: cli-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+defaults:
+ run:
+ working-directory: seatunnel-cli
+
+jobs:
+ lint:
+ name: Lint
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.10'
+ cache: pip
+ cache-dependency-path: seatunnel-cli/pyproject.toml
+
+ - name: Install ruff
+ # Pinned, and kept in step with the `dev` extra in
seatunnel-cli/pyproject.toml, so
+ # that a new ruff release cannot turn an unrelated pull request red
and so that a
+ # contributor running `ruff check` locally sees the same findings as
this job.
+ run: python -m pip install 'ruff==0.16.7'
+
+ - name: Check for Python errors
+ # Rule selection lives in [tool.ruff.lint] so this command reports
exactly what a
+ # contributor sees when running `ruff check` locally.
+ run: ruff check .
+
+ test:
+ name: Test with Python ${{ matrix.python-version }}
+ runs-on: ubuntu-latest
+ timeout-minutes: 15
+
+ strategy:
+ fail-fast: false
+ matrix:
+ # The floor declared by requires-python and a current release, so a PR
cannot
+ # silently rely on a syntax or standard library feature outside that
range.
+ python-version: [ '3.10', '3.13' ]
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: pip
+ cache-dependency-path: seatunnel-cli/pyproject.toml
+
+ - name: Install seatunnel-cli with its dev dependencies
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install -e '.[dev]'
+
+ - name: Run tests
+ # `python -m pytest` puts the working directory on sys.path, which the
tests rely
+ # on to import the `benchmark` package. It ships next to
`seatunnel_cli` but is not
+ # part of the installed distribution, so plain `pytest` would not find
it.
+ # The suite is offline and needs no model credentials.
+ run: python -m pytest tests -v
diff --git a/seatunnel-cli/pyproject.toml b/seatunnel-cli/pyproject.toml
index e88f56efdb..3d4a683f80 100644
--- a/seatunnel-cli/pyproject.toml
+++ b/seatunnel-cli/pyproject.toml
@@ -41,7 +41,9 @@ anthropic = ["anthropic>=0.42.0"]
openai = ["openai>=1.0.0"]
bedrock-mantle = ["boto3>=1.34.0", "openai>=2.45.0",
"aws-bedrock-token-generator>=1.0.0"]
all = ["boto3>=1.34.0", "anthropic>=0.42.0", "openai>=2.45.0",
"aws-bedrock-token-generator>=1.0.0"]
-dev = ["pytest", "black", "ruff", "boto3>=1.34.0", "anthropic>=0.42.0",
"openai>=2.45.0", "aws-bedrock-token-generator>=1.0.0"]
+# ruff is pinned, and kept in step with the Lint job in
.github/workflows/cli.yml, so that
+# `ruff check` reports the same findings here as it does in CI.
+dev = ["pytest", "black", "ruff==0.16.7", "boto3>=1.34.0",
"anthropic>=0.42.0", "openai>=2.45.0", "aws-bedrock-token-generator>=1.0.0"]
[tool.setuptools.packages.find]
include = ["seatunnel_cli*"]
@@ -51,3 +53,10 @@ seatunnel_cli = ["golden_examples/*.md", "skills/*.md"]
[tool.setuptools.dynamic]
version = {attr = "seatunnel_cli.__version__"}
+
+[tool.ruff.lint]
+# Error-level rules only: syntax errors (E9), invalid comparisons and tests
(F63, F7) and
+# undefined names (F82). The remaining pyflakes rules and the style rules
still report
+# findings across the existing sources, so turning them on belongs in a
dedicated clean-up
+# change instead of silently failing every unrelated pull request.
+select = ["E9", "F63", "F7", "F82"]