Skip to content
Closed
Show file tree
Hide file tree
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
26 changes: 7 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ jobs:
with:
version: "0.11.27"
- run: uv sync --all-extras --locked
- run: >-
- name: Run Tier 3 contract and progress tests
run: >-
uv run pytest -q
tests/test_harbor_local_sandbox.py
tests/test_harbor_local_mode.py
Expand All @@ -370,24 +371,11 @@ jobs:
tests/test_tier3_progress.py
tests/test_tier3_result_display.py
tests/test_harbor_runtime_preflight.py

tier2-macos:
name: Tier 2 (macos-latest)
needs: classify-changes
if: ${{ !cancelled() && needs.classify-changes.outputs.docs_only != 'true' }}
runs-on: macos-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
version: "0.11.27"
- run: uv sync --all-extras --locked
- run: >-
# These ran in a separate "Tier 2 (macos-latest)" job with the same runner
# and install. They still run when the step above fails.
- name: Run Tier 2 tests
if: ${{ !cancelled() }}
Comment thread
chrisknvidia marked this conversation as resolved.
Resolved
run: >-
uv run pytest -q
tests/embedding
tests/deduplication
Expand Down
16 changes: 13 additions & 3 deletions tests/test_ci_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"test-python-314": "Tests (Python 3.14)",
"package": "Package",
"rhel8-security-install": "RHEL 8 security install",
"tier2-macos": "Tier 2 (macos-latest)",
"tier2-windows": "Tier 2 (windows-latest)",
"tier3-macos": "Tier 3 macOS contract and progress",
"native-windows-local-mode": "Native Windows local mode fails closed",
Expand Down Expand Up @@ -213,13 +212,24 @@ def test_full_lane_keeps_the_existing_commands_and_runners() -> None:
assert jobs["test-python-314"]["runs-on"] == "ubuntu-latest"
assert "uv sync --all-extras --locked --python 3.14" in _runs(jobs["test-python-314"])
assert "uv run pytest -q" in _runs(jobs["test-python-314"])
assert jobs["tier2-macos"]["runs-on"] == "macos-latest"
assert jobs["tier2-windows"]["runs-on"] == "windows-latest"
assert "tests/embedding" in _runs(jobs["tier2-macos"])
assert "tests/embedding" in _runs(jobs["tier2-windows"])
assert "tests/test_harbor_runner_status.py" in _runs(jobs["tier2-windows"])
assert jobs["tier3-macos"]["runs-on"] == "macos-latest"
assert "tests/test_tier3_progress.py" in _runs(jobs["tier3-macos"])
# The macOS Tier 2 tests share the Tier 3 macOS job and run even when its own tests fail.
macos_test_steps = [step for step in jobs["tier3-macos"]["steps"] if "pytest" in step.get("run", "")]
assert [step["name"] for step in macos_test_steps] == ["Run Tier 3 contract and progress tests", "Run Tier 2 tests"]
tier2_paths = {
"tests/embedding",
"tests/deduplication",
"tests/validators/test_similarity.py",
"tests/reporting",
"tests/test_cli.py",
"tests/test_oss_packaging.py",
}
assert tier2_paths <= set(shlex.split(macos_test_steps[1]["run"], comments=True))
assert macos_test_steps[1]["if"] == RUN_UNLESS_CANCELLED_IF
assert jobs["native-windows-local-mode"]["runs-on"] == "windows-latest"
assert "tests/test_harbor_local_mode.py" in _runs(jobs["native-windows-local-mode"])
assert jobs["rhel8-security-install"]["container"] == "rockylinux/rockylinux:8.10"
Expand Down
4 changes: 3 additions & 1 deletion tests/tier3/test_budget_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,9 @@ def harbor(**_kwargs):
finally:
finish_job.set()
budget.cancel()
with pytest.raises(BudgetCancelledError):
# Both workers observe cancellation. Either the waiting budget admission or
# the in-flight Harbor job can surface first through as_completed().
with pytest.raises((BudgetCancelledError, runner._HarborRunCancelledError)):
future.result(timeout=5)
assert budget.metadata()["reservation"]["in_flight_attempts"] == 0
assert budget.metadata()["not_run"] == []
Loading