From 64d4cb53b268b2d95807746c9895bd886fcf5911 Mon Sep 17 00:00:00 2001 From: Chandrasekharan M Date: Wed, 29 Jul 2026 14:42:06 +0530 Subject: [PATCH] ci: add focused clone test workflow (UN-3770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a paths-scoped GitHub Actions workflow that runs the clone test suite whenever clone code, its tests, or the dependency set changes. Gives a fast, dedicated signal for the pagination page-following logic in client._paginate — a silent-truncation regression there is worse than a hard failure, so it must stay guarded on every clone change. The full suite in test.yml still runs on every PR; this narrows the trigger and the run to tests/clone/ for quicker feedback. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/clone-tests.yml | 52 +++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/clone-tests.yml diff --git a/.github/workflows/clone-tests.yml b/.github/workflows/clone-tests.yml new file mode 100644 index 0000000..4b4e1f4 --- /dev/null +++ b/.github/workflows/clone-tests.yml @@ -0,0 +1,52 @@ +name: Clone Tests + +# Focused, fast signal for the clone tooling — runs only the clone suite when +# clone code, its tests, or the dependency set changes. The full suite in +# test.yml still runs on every PR; this gates the pagination page-following +# logic (client._paginate) that silently truncates a migration if it regresses. +on: + pull_request: + branches: [main, "feat/**", "fix/**"] + paths: + - "src/unstract/clone/**" + - "tests/clone/**" + - "pyproject.toml" + - "uv.lock" + - ".github/workflows/clone-tests.yml" + push: + branches: [main] + paths: + - "src/unstract/clone/**" + - "tests/clone/**" + - "pyproject.toml" + - "uv.lock" + - ".github/workflows/clone-tests.yml" + +jobs: + clone-tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: "0.6.14" + enable-cache: true + + - name: Install dependencies + run: uv sync --dev --all-extras + + - name: Create test env + run: cp tests/sample.env tests/.env + + - name: Clone tests (pytest) + run: uv run pytest tests/clone/ -v