Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments are only sent when GNU/BFS test compatibility changes. #407

Merged
merged 5 commits into from
Jun 28, 2024

Conversation

hanbings
Copy link
Collaborator

Tested in fork, this change may still only take effect after being merged.

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.31%. Comparing base (f2202dc) to head (ac4ef9d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   65.31%   65.31%           
=======================================
  Files          34       34           
  Lines        3941     3941           
  Branches      903      903           
=======================================
  Hits         2574     2574           
  Misses       1001     1001           
  Partials      366      366           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -58,7 +58,14 @@ 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: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0');
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems a bit fragile. In the json, we don't have the number to do some if > 0 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might mean getting the results for the master branch in comment.yml and comparing them to bfs-result.json and gnu-result.json? I think this might be a bit repetitive and complicated.

How about changing compare_bfs_result.py to send a Github Actions Annotations using print(f"::warning :: BFS tests no change.") and catch annotation in comment.yml when compatibility is unchanged?

Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably better and easier

Copy link

GNU testsuite comparison:

Run BFS tests: Changes from main: PASS +0 / SKIP +0 / FAIL +0
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 182 / SKIP: 1 / FAIL: 105
Run GNU findutils tests: GNU tests summary = TOTAL: 718 / PASS: 433 / FAIL: 282 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 

Copy link

GNU testsuite comparison:

Run GNU findutils tests: GNU tests summary = TOTAL: 718 / PASS: 433 / FAIL: 282 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 
Run BFS tests: Changes from main: PASS +0 / SKIP +0 / FAIL +0
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 182 / SKIP: 1 / FAIL: 105

Copy link

GNU testsuite comparison:

Run GNU findutils tests: GNU tests summary = TOTAL: 718 / PASS: 433 / FAIL: 282 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 
Run GNU findutils tests: Gnu tests No changes
Run BFS tests: Changes from main: PASS +0 / SKIP +0 / FAIL +0
Run BFS tests: BFS tests No changes
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 182 / SKIP: 1 / FAIL: 105

@sylvestre
Copy link
Sponsor Contributor

i guess it isn't ready yet, right ? :)

@hanbings
Copy link
Collaborator Author

Yeah, I haven't tested this code on my fork yet.
I originally wanted to mark this PR as Draft, but Github doesn't seem to show me that button. I'll mention you here when I'm done, thanks! :)

@hanbings
Copy link
Collaborator Author

hanbings commented Jun 27, 2024

@sylvestre done.
This is a sample generated during testing: hanbings#19 (comment)
Is there anything else we need to add?

Copy link

GNU testsuite comparison:

Run GNU findutils tests: GNU tests summary = TOTAL: 706 / PASS: 441 / FAIL: 262 / ERROR: 2
Run GNU findutils tests: Changes from main: PASS +0 / FAIL +0 / ERROR +0 / SKIP +0 
Run GNU findutils tests: Gnu tests No changes
Run BFS tests: Changes from main: PASS +0 / SKIP +0 / FAIL +0
Run BFS tests: BFS tests No changes
Run BFS tests: BFS tests summary = TOTAL: 288 / PASS: 186 / SKIP: 1 / FAIL: 101

@sylvestre
Copy link
Sponsor Contributor

sorry, looks like i wasn't cleary. What I would like is to have nothing to display when
BFS tests or Gnu tests = No changes

we should only display something when we noticed changes in bfs or gnu tests

@hanbings
Copy link
Collaborator Author

sorry, looks like i wasn't cleary. What I would like is to have nothing to display when BFS tests or Gnu tests = No changes

we should only display something when we noticed changes in bfs or gnu tests

No, actually it does not send comments when it contains No changes. But Github Actions will only execute the workflows file of the default branch, and the logic of whether to send comments is in the comment.yml file, so we need to merge this PR first to see the final effect.

@sylvestre sylvestre merged commit f145469 into uutils:main Jun 28, 2024
19 checks passed
@sylvestre
Copy link
Sponsor Contributor

ok, let's see :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants