-
Notifications
You must be signed in to change notification settings - Fork 205
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
test: fix tests in Windows environment #751
base: main
Are you sure you want to change the base?
Conversation
To view this pull requests documentation preview, visit the following URL: Documentation is deployed and generated using docs.page. |
de85b1c
to
8d93aea
Compare
@spydon even though this fix addresses the issue, it's a very hacky solution and I'm still testing in order to figure out the root cause of the problem |
2e9174b
to
0e1664c
Compare
# TODO: In theory, `melos test --no-select` under the hood is the same | ||
# as the following command. For some reason, using this one directly | ||
# provides the actual exit code of the process, avoiding | ||
# always returning 'SUCCESS' even when tests are failing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like something we should file a bug for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree
@@ -46,6 +48,7 @@ void main() { | |||
|
|||
logger = TestLogger(); | |||
final config = await MelosWorkspaceConfig.fromWorkspaceRoot(workspaceDir); | |||
expectedExitCode = currentPlatform.isWindows ? 0 : 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the expected exit code 0 for windows? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, that's what I'm trying to figure out. I'm not really sure what's going on. It's the same issue in the run_test
and even the windows_test
step in the pipeline have this problem, exit code it's 1 but is 0 in windows environments.
01898ef
to
7eaeef0
Compare
7eaeef0
to
d6b707f
Compare
@spydon, It seems like the exit code when running in Windows environments is not reliable, and this causes issues when using some Melos commands. |
Hmm, there must be some underlying issue for that... |
9302716
to
7832bbd
Compare
Description
Hello Everyone 👋. Some tests were failing when running in Windows environments, so this PR addresses this issue and offers a fix.
Fixes: #757
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore