mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
maint/CICD ~ (GnuTests) support local bespoke repo default branch
This commit is contained in:
parent
8518fff0fd
commit
bed7dc5a29
2 changed files with 5 additions and 2 deletions
|
@ -9,6 +9,8 @@ import json
|
|||
import sys
|
||||
from os import environ
|
||||
|
||||
REPO_DEFAULT_BRANCH = environ.get('REPO_DEFAULT_BRANCH', 'main')
|
||||
|
||||
NEW = json.load(open("gnu-result.json"))
|
||||
OLD = json.load(open("main-gnu-result.json"))
|
||||
|
||||
|
@ -24,12 +26,12 @@ skip_d = int(current["skip"]) - int(last["skip"])
|
|||
|
||||
# Get an annotation to highlight changes
|
||||
print(
|
||||
f"::warning ::Changes from main: PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
|
||||
f"::warning ::Changes from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
|
||||
)
|
||||
|
||||
# If results are worse fail the job to draw attention
|
||||
if pass_d < 0:
|
||||
print(
|
||||
f"::error ::PASS count is reduced from main: PASS {pass_d:+d} "
|
||||
f"::error ::PASS count is reduced from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} "
|
||||
)
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue