ci(pull-request): hardening — concurrency, draft-skip, permissions, timeout#450
Merged
Conversation
…imeout Adopt zkcoins/server ci.yaml patterns: - Concurrency group keyed by PR head SHA with cancel-in-progress so a new push aborts the obsolete macOS run (~10 min saved per push). - Skip workflow on draft PRs (matches our `gh pr create --draft` flow); `ready_for_review` added to types so toggling draft → ready fires CI immediately. - `push: develop` added as authoritative post-merge gate (independent of PR state). - Workflow-level `permissions: contents: read` (least privilege). - Explicit `timeout-minutes: 30` to bound stuck macOS runs. - Inline comments document the WHY for each non-obvious choice.
…en comments - Drop `main` from `pull_request.branches`: the release PR (develop → main) is auto-opened by `auto-release-pr.yaml`, so every push to develop would otherwise fire a duplicate `pull_request` run on the release PR for the same SHA — concurrency cancels one and surfaces a red check. Matches the comment block and the zkcoins/server reference. - Rename concurrency group prefix `pr-` → `ci-` (the group covers `push` and `workflow_dispatch` events too; `pr-` was misleading on those). - Document why `labeled` / `unlabeled` types are intentionally omitted (no label-gated heavy job in realunit-app). - Document that `workflow_dispatch` is a manual override and is NOT draft-gated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt the CI-check patterns from
zkcoins/serverci.yamlinpull-request.yaml.cancel-in-progress: trueso a new push aborts the obsolete macOS run (~10 min saved per push).if: github.event.pull_request.draft == false.ready_for_reviewadded topull_request.typesso toggling draft → ready triggers CI immediately. Matches ourgh pr create --draftworkflow.push: developtrigger as authoritative post-merge gate, independent of PR state.permissions: contents: read(least privilege).timeout-minutes: 30to bound stuck macOS runs.What is intentionally NOT included
macos-latestfor now. Native-plugin surface (bitbox_flutterGo-FFI, Sumsub) is risky to validate inside this PR; the existing macOS baseline is preserved as-is.ci:full. RealUnit has no self-hosted-runner gate to justify the split today.realuni.appURLs which currently do not resolve (Infomaniak NS swap pending). Will follow up once DNS is live.Test plan
push: developrun is green.