Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

ci: draft pull requests run no CI until they're ready for review (#2517)

Irakli Kourtisd2ccb576ddd4
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 68a11b8e4c..a266648839 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -30,7 +30,10 @@
name: CI
on:
+ # Draft pull requests run no CI (see `changes`, `checks` and `ci`): it starts when the PR is
+ # marked ready for review, and on every push after that.
pull_request:
+ types: [opened, synchronize, reopened, ready_for_review]
# The merge queue: each queued group runs the full suite before it lands on main.
merge_group:
push:
@@ -72,6 +75,8 @@ jobs:
changes:
name: Select checks
+ # Not on a draft: every other check needs this one, so they skip too.
+ if: github.event_name != 'pull_request' || !github.event.pull_request.draft
# Trusted runs (see the top of this file) use the self-hosted runners.
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && 'self-hosted-light' || 'ubuntu-24.04' }}
permissions:
@@ -188,6 +193,7 @@ jobs:
checks:
name: Format and repository checks
+ if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && 'self-hosted-fast' || 'ubuntu-24.04' }}
timeout-minutes: 15
steps:
@@ -620,7 +626,7 @@ jobs:
# Preserve the existing check name for branch protection, including docs-only PRs.
ci:
needs: [changes, checks, clippy, build-tests, tests, doc-tests, oracle, windows-fxc, windows-startup]
- if: always()
+ if: always() && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ${{ needs.changes.outputs.local == 'true' && 'self-hosted-light' || 'ubuntu-24.04' }}
steps:
- name: Verify required checks