From c19af5e7145cab52f6bbf1ffc9b459159698edce Mon Sep 17 00:00:00 2001 From: Mason Daugherty Date: Tue, 17 Mar 2026 16:49:40 -0400 Subject: [PATCH] ci: shallow clone in all workflows (#3173) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `fetch-depth: 1` to all `actions/checkout@v6` steps across CI workflows. Full git history isn't needed for any of these jobs — shallow clones cut checkout time and reduce runner disk/network usage. --- .github/workflows/_check-links.yml | 2 ++ .github/workflows/_lint.yml | 2 ++ .github/workflows/_test.yml | 2 ++ .github/workflows/check-agents-sync.yml | 2 ++ .github/workflows/check-import-mappings.yml | 2 ++ .github/workflows/ci.yml | 4 ++++ .github/workflows/publish.yml | 2 ++ .github/workflows/update-package-downloads.yml | 4 ++++ 8 files changed, 20 insertions(+) diff --git a/.github/workflows/_check-links.yml b/.github/workflows/_check-links.yml index 7537b5dba..b84b82284 100644 --- a/.github/workflows/_check-links.yml +++ b/.github/workflows/_check-links.yml @@ -39,6 +39,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Configure Python ${{ inputs.python-version }} with uv package manager uses: "./.github/actions/uv_setup" diff --git a/.github/workflows/_lint.yml b/.github/workflows/_lint.yml index 30ba1ce18..f1d7f09ab 100644 --- a/.github/workflows/_lint.yml +++ b/.github/workflows/_lint.yml @@ -27,6 +27,8 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Set up Python ${{ inputs.python-version }} + uv uses: "./.github/actions/uv_setup" diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 2d551b588..a115d7d1d 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -26,6 +26,8 @@ jobs: name: "make test #${{ inputs.python-version }}" steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Set up Python ${{ inputs.python-version }} + uv uses: "./.github/actions/uv_setup" diff --git a/.github/workflows/check-agents-sync.yml b/.github/workflows/check-agents-sync.yml index 52403e8a4..81c27d758 100644 --- a/.github/workflows/check-agents-sync.yml +++ b/.github/workflows/check-agents-sync.yml @@ -27,6 +27,8 @@ jobs: steps: - name: "📋 Checkout Code" uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: "🔍 Check CLAUDE.md and AGENTS.md are in sync" run: | diff --git a/.github/workflows/check-import-mappings.yml b/.github/workflows/check-import-mappings.yml index 25a8ef447..8f47a6a07 100644 --- a/.github/workflows/check-import-mappings.yml +++ b/.github/workflows/check-import-mappings.yml @@ -18,6 +18,7 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: + fetch-depth: 1 persist-credentials: false - name: Set up Python 3.13 + uv @@ -112,6 +113,7 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: + fetch-depth: 1 persist-credentials: false - name: Download updated files diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0be8122f..ba64b46ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,8 @@ jobs: contents: read steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - uses: "./.github/actions/uv_setup" with: python-version: "3.13" @@ -82,6 +84,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Skip check for automated updates env: PR_TITLE: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 73181d634..a6097b613 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,6 +14,8 @@ jobs: contents: write steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Set up Python 3.13 + uv uses: "./.github/actions/uv_setup" id: setup-python diff --git a/.github/workflows/update-package-downloads.yml b/.github/workflows/update-package-downloads.yml index 649033edf..e9f64ca72 100644 --- a/.github/workflows/update-package-downloads.yml +++ b/.github/workflows/update-package-downloads.yml @@ -16,6 +16,8 @@ jobs: contents: read steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Set up Python 3.13 + uv uses: "./.github/actions/uv_setup" @@ -56,6 +58,8 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v6 + with: + fetch-depth: 1 - name: Download updated files uses: actions/download-artifact@v7