mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
CI: improve the intermittent ignore
This commit is contained in:
parent
0936cee9d5
commit
55bedbb68e
2 changed files with 20 additions and 4 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
"""
|
||||
Compare the current results to the last results gathered from the main branch to highlight
|
||||
if a PR is making the results better/worse
|
||||
if a PR is making the results better/worse.
|
||||
Don't exit with error code if all failing tests are in the ignore-intermittent.txt list.
|
||||
"""
|
||||
|
||||
import json
|
||||
|
@ -10,6 +11,7 @@ import sys
|
|||
from os import environ
|
||||
|
||||
REPO_DEFAULT_BRANCH = environ.get("REPO_DEFAULT_BRANCH", "main")
|
||||
ONLY_INTERMITTENT = environ.get("ONLY_INTERMITTENT", "false")
|
||||
|
||||
NEW = json.load(open("gnu-result.json"))
|
||||
OLD = json.load(open("main-gnu-result.json"))
|
||||
|
@ -29,9 +31,18 @@ print(
|
|||
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 results are worse, check if we should fail the job
|
||||
if pass_d < 0:
|
||||
print(
|
||||
f"::error ::PASS count is reduced from '{REPO_DEFAULT_BRANCH}': PASS {pass_d:+d} "
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# Check if all failing tests are intermittent based on the environment variable
|
||||
only_intermittent = ONLY_INTERMITTENT.lower() == 'true'
|
||||
|
||||
if only_intermittent:
|
||||
print("::notice ::All failing tests are in the ignored intermittent list")
|
||||
print("::notice ::Not failing the build")
|
||||
else:
|
||||
print("::error ::Found non-ignored failing tests")
|
||||
sys.exit(1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue