mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
ci: make hot-path coverage gates required PR checks (#921)
* ci: make hot-path coverage gates required PR checks Remove continue-on-error from frontend and Rust coverage jobs now that the hot-path lists have stabilized; update docs and script headers. * docs: note hard coverage gates in changelog and credits (PR #921) * chore: drop credits entry for CI-only PR #921 Contributor credits are for user-visible work, not infra toggles.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Hot-path file coverage gate — frontend, soft mode.
|
||||
# Hot-path file coverage gate — frontend.
|
||||
#
|
||||
# Mirrors `scripts/check-hot-path-coverage.sh` for the Rust workspace. For
|
||||
# each source file listed in `.github/frontend-hot-path-files.txt`, verifies
|
||||
# that line coverage is at least $THRESHOLD %. Emits GitHub Actions warning
|
||||
# annotations for files below the floor; exits 1 when any file is below, but
|
||||
# the wrapping CI job carries `continue-on-error: true` so it doesn't block
|
||||
# merges yet (drop that flag once we've watched a few PRs run cleanly).
|
||||
# annotations for files below the floor and exits 1 when any file is below.
|
||||
#
|
||||
# Why files instead of per-function: v8 coverage's per-function data is
|
||||
# fragile under React Compiler / Vite minification — file-level line
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Hot-path file coverage gate — soft mode.
|
||||
# Hot-path file coverage gate.
|
||||
#
|
||||
# For each source file listed in `.github/hot-path-files.txt`, verifies
|
||||
# that line coverage is at least $THRESHOLD %. Emits GitHub Actions
|
||||
# warning annotations for files below the floor; never sets a non-zero
|
||||
# exit code (soft gate).
|
||||
# warning annotations for files below the floor and exits 1 when any
|
||||
# file is below.
|
||||
#
|
||||
# Why files instead of per-function: cargo-llvm-cov's per-function
|
||||
# region data is unreliable for async state-machines (most regions live
|
||||
@@ -104,14 +104,6 @@ echo "Checked: $TOTAL hot-path file(s)"
|
||||
echo "Below threshold: $BELOW"
|
||||
echo "Not found: $NOT_FOUND"
|
||||
|
||||
# Two-layer gate:
|
||||
# - This script exits 1 when any hot-path file regresses below the
|
||||
# threshold. That gives an unambiguous CI signal in the workflow log.
|
||||
# - The `coverage` job in `.github/workflows/rust-tests.yml` carries
|
||||
# `continue-on-error: true`, so the failing exit is visible in the
|
||||
# PR's checks panel but does NOT block merges yet.
|
||||
# - Flip to a hard PR-blocker by removing `continue-on-error` from the
|
||||
# workflow once we've watched a few PRs run cleanly.
|
||||
if [[ "$BELOW" -gt 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user