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

testing git-diff #40

Closed
wants to merge 1 commit into from

Conversation

relentless-pursuit
Copy link
Collaborator

Part of #1

@relentless-pursuit
Copy link
Collaborator Author

I have been reading about this CI command added git-diff, but struggle to understand. To my understanding, CI checks out my PR and compares the changes with the latest code available on remote. And, if any untracked changes, then it will fail. For instance, i have untracked changes in this PR in my local. But, the job seems to succeed.

@romani
Copy link
Member

romani commented Jun 19, 2024

https://github.com/checkstyle/test-configs/actions/runs/9578108855/job/26407651096?pr=40#step:5:204

test is not failed, even it is crashed with exception and produced no output.

I checked it on local, no diff on local.
diff check works.

@romani romani mentioned this pull request Jun 19, 2024
@romani
Copy link
Member

romani commented Jun 19, 2024

you will improve at scope of this issue - #41

@romani
Copy link
Member

romani commented Jun 20, 2024

@relentless-pursuit , please rebase

@relentless-pursuit relentless-pursuit force-pushed the PR8 branch 2 times, most recently from 9a9af97 to 55da0c7 Compare June 21, 2024 17:10
@relentless-pursuit
Copy link
Collaborator Author

Rebased. But, i am not sure how this git diff works? Shouldn't the job be pointing to new files added liek clone the latest checkstyle test-config and compare with the PR?

@romani
Copy link
Member

romani commented Jun 22, 2024

No, it just do git status on PR code after execution.

Create new file in git repository from test execution and it should be caught

@relentless-pursuit
Copy link
Collaborator Author

No, it just do git status on PR code after execution.

Create new file in git repository from test execution and it should be caught

yes, i did. but, i guess i didn't see any failure. i created a folder from mainslaunchertest.java and then i first kept them in unstaged. but, the job didn't fail. then in the next commit, i put them in the staging and did commit.

@romani
Copy link
Member

romani commented Jun 22, 2024

New empty folder is not status changed for git, please create file

Copy link
Member

@romani romani left a comment

Choose a reason for hiding this comment

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

Item

@@ -0,0 +1,34 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
Copy link
Member

Choose a reason for hiding this comment

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

Remove from commit this folder and it should be caught

@relentless-pursuit
Copy link
Collaborator Author

New empty folder is not status changed for git, please create file

I had actually created a complete folder with config.xml. Except, i didn't commit but kept in unstaged env. Yes, i will act on the review and test again.

@romani
Copy link
Member

romani commented Jun 23, 2024

It works, see it here https://github.com/checkstyle/test-configs/actions/runs/9635984919/job/26573394995?pr=53#step:6:30

I think you can close this PR

@relentless-pursuit
Copy link
Collaborator Author

Closing the PR as testing is validated.

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.

2 participants