From d5a04bb361d10e3dffa4bca05f646291db4a3318 Mon Sep 17 00:00:00 2001 From: Alexandre Boucaud Date: Fri, 8 May 2026 10:42:39 +0200 Subject: [PATCH] fix(ci): skip draft PRs in review, eval, and test workflows Claude code review and eval are expensive and should not run on work in progress. Tests are also skipped on drafts to save CI minutes. - claude-code-review: if: draft == false - eval: if: workflow_dispatch OR draft == false - tests: if: push OR draft == false; also migrates from pip/setup-python to uv, and adds Python 3.13 to the test matrix Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/claude-code-review.yml | 7 +------ .github/workflows/eval.yml | 1 + .github/workflows/tests.yml | 11 +++++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index b5e8cfd4..da717f28 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -12,12 +12,7 @@ on: jobs: claude-review: - # Optional: Filter by PR author - # if: | - # github.event.pull_request.user.login == 'external-contributor' || - # github.event.pull_request.user.login == 'new-developer' || - # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - + if: github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index d4345b18..4fbb62c4 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -15,6 +15,7 @@ permissions: jobs: eval: + if: github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false runs-on: ubuntu-latest timeout-minutes: 30 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5a2a4b77..cb04c03f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,24 +7,27 @@ on: jobs: test: + if: github.event_name == 'push' || github.event.pull_request.draft == false runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Set up uv + uses: astral-sh/setup-uv@v6 with: python-version: ${{ matrix.python-version }} + enable-cache: true + activate-environment: true - name: Configure git credentials for private ASTRA repo run: git config --global url."https://x-access-token:${{ secrets.ASP_TOKEN }}@github.com/".insteadOf "https://github.com/" - name: Install dependencies - run: pip install -e ".[dev]" + run: uv sync --group dev - name: Run tests run: pytest