Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, closed]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document the new draft-PR CI behavior

This changes externally observable automation behavior by suppressing all three CI jobs for draft and closed pull requests, but the commit leaves CHANGELOG.md, the CI/operator documentation, and the doctoring record unchanged. Document when these checks are skipped and rerun—especially that skipped jobs are not exact-head verification—so maintainers and automation do not misinterpret draft-head evidence; repository policy requires these documentation updates whenever behavior changes.

AGENTS.md reference: AGENTS.md:L56-L57

Useful? React with 👍 / 👎.


# Cancel superseded evidence for the same pull request or branch. This keeps the
# runner queue bounded during review-fix loops while preserving the newest head.
Expand All @@ -17,6 +18,7 @@ permissions:

jobs:
account-unification-tests:
if: ${{ github.event_name != 'pull_request' || (github.event.action != 'closed' && github.event.pull_request.draft == false) }}
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -49,6 +51,7 @@ jobs:
run: uv build --out-dir dist

realm-config-validates:
if: ${{ github.event_name != 'pull_request' || (github.event.action != 'closed' && github.event.pull_request.draft == false) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -68,6 +71,7 @@ jobs:
PY

compose-config-validates:
if: ${{ github.event_name != 'pull_request' || (github.event.action != 'closed' && github.event.pull_request.draft == false) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,19 @@ def test_ci_cancels_only_superseded_heads_from_the_same_pull_request() -> None:
assert "cancel-in-progress: ${{ github.event_name == 'pull_request' }}" in workflow


def test_ci_skips_draft_and_closed_pull_requests() -> None:
workflow = (WORKFLOWS / "ci.yml").read_text(encoding="utf-8")

assert (
"types: [opened, synchronize, reopened, ready_for_review, converted_to_draft, closed]"
in workflow
)
admission = (
"if: ${{ github.event_name != 'pull_request' || "
"(github.event.action != 'closed' && github.event.pull_request.draft == false) }}"
)
assert workflow.count(admission) == 3


def test_central_codeql_is_not_duplicated_locally() -> None:
assert not (WORKFLOWS / "codeql.yml").exists()
Loading