-
Notifications
You must be signed in to change notification settings - Fork 2
UN-3770 [CI] Add focused clone test workflow #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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/**"] | ||
| 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
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 How this was verified: Each external action is invoked through an Prompt To Fix With AIThis 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! |
||
|
|
||
| - 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 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
branchesfilter prevents this workflow from running when a clone-related pull request targets any branch outsidemain,feat/**, orfix/**, 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.Prompt To Fix With AI
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!