Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/clone-tests.yml
Original file line number Diff line number Diff line change
@@ -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/**"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Restricted pull-request base branches

The branches filter prevents this workflow from running when a clone-related pull request targets any branch outside main, feat/**, or fix/**, such as a release or maintenance branch. Removing the filter ensures every pull request with a matching clone or dependency path receives the dedicated test signal.

Suggested change
branches: [main, "feat/**", "fix/**"]
Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/clone-tests.yml
Line: 9

Comment:
**Restricted pull-request base branches**

The `branches` filter prevents this workflow from running when a clone-related pull request targets any branch outside `main`, `feat/**`, or `fix/**`, such as a release or maintenance branch. Removing the filter ensures every pull request with a matching clone or dependency path receives the dedicated test signal.

```suggestion

```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security Mutable external action references

The workflow executes three external actions through mutable major-version tags, so an upstream tag change can alter the working tree or toolchain and falsify the focused test result. Pin checkout, setup-python, and setup-uv to immutable commit SHAs.

How this was verified: Each external action is invoked through an @v4, @v5, or @v6 reference before the test command runs.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/clone-tests.yml
Line: 33

Comment:
**Mutable external action references**

The workflow executes three external actions through mutable major-version tags, so an upstream tag change can alter the working tree or toolchain and falsify the focused test result. Pin `checkout`, `setup-python`, and `setup-uv` to immutable commit SHAs.

**How this was verified:** Each external action is invoked through an `@v4`, `@v5`, or `@v6` reference before the test command runs.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code


- 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
Loading