deptrac icon indicating copy to clipboard operation
deptrac copied to clipboard

test-suite doesn't green on windows

Open staabm opened this issue 3 years ago • 7 comments

running the testsuite on a windows box lead to a lot of errors.

...<snip>

C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115

31) Tests\Qossmic\Deptrac\OutputFormatter\BaselineOutputFormatterTest::testBasic with data set #1 (array(Qossmic\Deptrac\RulesetEngine\Violation Object (...)), 'skip_violations:\r\n  Origina...lB\r\n')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'skip_violations:\r\n
-  OriginalA:\r\n
-    - OriginalB\r\n
+'skip_violations:\n
+  OriginalA:\n
+    - OriginalB\n
 '

C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115

32) Tests\Qossmic\Deptrac\OutputFormatter\BaselineOutputFormatterTest::testBasic with data set #0 (array(Qossmic\Deptrac\RulesetEngine\Violation Object (...)), 'skip_violations:\r\n  ClassA:...sB\r\n')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'skip_violations:\r\n
-  ClassA:\r\n
-    - ClassB\r\n
+'skip_violations:\n
+  ClassA:\n
+    - ClassB\n
 '

C:\dvl\GitHub\deptrac\tests\OutputFormatter\BaselineOutputFormatterTest.php:115

FAILURES!
Tests: 283, Assertions: 466, Failures: 32.

it seems most of them are related to mixed line-endings.

staabm avatar Jun 16 '21 10:06 staabm

@staabm great catch. Would you be able to provide a PR with a fix? I am an exclusive Unix user, so I cannot emulate these errors easily.

patrickkusebauch avatar Jun 17 '21 15:06 patrickkusebauch

Sure, will have a look

staabm avatar Jun 18 '21 18:06 staabm

Thanks for reporting this and working on this. Let me know if I can help somehow. I primarily work on Mac, so it's hard for me to reproduce. Maybe we can have a look at running github-actions on different OSes in the future to avoid this. For now, I think a simple fix to make it work locally for you, should suffice.

dbrumann avatar Jul 03 '21 09:07 dbrumann

This issue has not seen activity in a while and will be closed automatically soon.

github-actions[bot] avatar Sep 10 '21 14:09 github-actions[bot]

@github-actions don't do that!

patrickkusebauch avatar Sep 10 '21 18:09 patrickkusebauch

This issue has not seen activity in a while and will be closed automatically soon.

github-actions[bot] avatar Nov 10 '21 14:11 github-actions[bot]

Stop it! Bad bot!

dbrumann avatar Nov 17 '21 14:11 dbrumann

@patrickkusebauch @dbrumann can this issue be closed with #1029? Or is here still sth to do like integrating a windows env in the build pipeline (not needed IMHO)

maxbeckers avatar Dec 06 '22 09:12 maxbeckers

I will close this. I don't want to include an appveyor Windows-build to the pipeline. I know the Symfony-team often has issues with slow builds and random failures.

dbrumann avatar Dec 06 '22 09:12 dbrumann

any reason why we don't add a windows github action job?

staabm avatar Dec 06 '22 09:12 staabm

any reason why we don't add a windows github action job?

What's the benefit you expect of such a github action job?

maxbeckers avatar Dec 06 '22 10:12 maxbeckers

in case we don't run the test-suite on a windows CI job, the test-suite will finally fail at some point in time and noone will realize

staabm avatar Dec 06 '22 10:12 staabm

Yes of course, but do you see just a failing test on a windows mashine because of a lineending problem or whatever, fixed in a few minutes when someone realizes or are you talking about bugs in deptrack on windows hosts?

maxbeckers avatar Dec 06 '22 12:12 maxbeckers

I am not talking about a particular problem. In my experience everything which is not run in CI and is covered by a test will break. its just a matter of time.

staabm avatar Dec 06 '22 12:12 staabm

@staabm I understand your concern and you are right. When the windows build is not part of the CI we might run the risk of errors being introduced unnoticed, especially since I don't test on Windows. Pretty much all Windows users I know use WSL2 or Docker, so I think it's not that relevant. Additionally, I maintain this mostly in my free time and I think a windows-build would take up time I would prefer spending on other things.

dbrumann avatar Dec 09 '22 15:12 dbrumann

:+1:

staabm avatar Dec 09 '22 15:12 staabm