mirror of
https://github.com/uutils/findutils.git
synced 2026-05-06 06:06:46 -04:00
Comments are only sent when GNU/BFS test compatibility changes. (#407)
This commit is contained in:
@@ -58,12 +58,19 @@ jobs:
|
||||
.map(annotation => `${annotation.run}: ${annotation.annotation.message}`)
|
||||
.join('\n');
|
||||
|
||||
console.log(annotationContent);
|
||||
// check if no changes
|
||||
let gnuTestReport = annotationContent.includes('Run GNU findutils tests: Gnu tests No changes');
|
||||
let bfsTestReport = annotationContent.includes('Run BFS tests: BFS tests No changes');
|
||||
|
||||
if (gnuTestReport && bfsTestReport) {
|
||||
console.log('No changes');
|
||||
return;
|
||||
}
|
||||
|
||||
// Comment on the PR
|
||||
github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: annotations.pull_request_number,
|
||||
body: 'GNU testsuite comparison:\n```\n' + annotationContent + '\n```\n'
|
||||
body: 'Commit ${{ github.event.workflow_run.head_sha }} has GNU testsuite comparison:\n```\n' + annotationContent + '\n```\n'
|
||||
});
|
||||
@@ -21,6 +21,10 @@ fail_d = int(current["fail"]) - int(last["fail"])
|
||||
# Get an annotation to highlight changes
|
||||
print(f"::warning ::Changes from main: PASS {pass_d:+d} / SKIP {skip_d:+d} / FAIL {fail_d:+d}")
|
||||
|
||||
# Check if there are no changes.
|
||||
if pass_d == 0:
|
||||
print("::warning ::BFS tests No changes")
|
||||
|
||||
# If results are worse fail the job to draw attention
|
||||
if pass_d < 0:
|
||||
sys.exit(1)
|
||||
|
||||
@@ -24,6 +24,10 @@ print(
|
||||
f"::warning ::Changes from main: PASS {pass_d:+d} / FAIL {fail_d:+d} / ERROR {error_d:+d} / SKIP {skip_d:+d} "
|
||||
)
|
||||
|
||||
# Check if there are no changes.
|
||||
if pass_d == 0:
|
||||
print("::warning ::Gnu tests No changes")
|
||||
|
||||
# If results are worse fail the job to draw attention
|
||||
if pass_d < 0:
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user