diff --git a/.github/workflows/breaking-change-detector.yml b/.github/workflows/breaking-change-detector.yml index c6bca1ef..856f6e17 100644 --- a/.github/workflows/breaking-change-detector.yml +++ b/.github/workflows/breaking-change-detector.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - fetch-depth: 0 # Required for griffe.load_git to access main branch history + fetch-depth: 0 # Required for griffe.load_git to access 'main' history - name: Set up Python uses: actions/setup-python@v5 @@ -25,42 +25,42 @@ jobs: uses: astral-sh/setup-uv@v5 - name: Install dependencies - # Syncing extras (like test) ensures 'google-auth' and other 'google.*' - # namespaces are populated, preventing ModuleNotFound errors. + # 1. uv sync installs the SDK (google-auth, pydantic, etc.) + # 2. uv pip install griffe ensures the detector tool is in the venv run: | uv sync --extra test uv pip install griffe - name: Run Breaking Change Detection - shell: python + # Using 'uv run python' is the key: it automatically runs the script + # inside the .venv created in the previous step, so both 'griffe' + # and 'google' are found. run: | + uv run python - <