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

Exit code 1 in Github Actions without any errors when reporting is enabled #7388

Closed
rChaoz opened this issue Jan 30, 2025 · 1 comment
Closed

Comments

@rChaoz
Copy link

rChaoz commented Jan 30, 2025

Describe the bug

I'm not sure how to debug this very well. My CI started failing since I added the following config to my vite.config.ts:

reporters: ["junit"],
outputFile: "build/report.junit.xml",

There is nothing (extra) in the logs other than the "report written to ..." message. However, it is a bit malformed, looks like some color/control sequences for the terminal don't work properly:

...
 25lJUNIT report written to /home/runner/work/fancy-boards/fancy-boards/build/report.junit.xml
25h

Update: It seems like there is indeed a weird failing test, that fails on CI but not locally. It seems like Vitest incorrectly reads the inline snapshot on CI, I'll try to come up with a reproduction.

@rChaoz rChaoz changed the title Exit code 1 in CI without any errors when reporting is enabled Exit code 1 in Github Actions without any errors when reporting is enabled Jan 30, 2025
@rChaoz
Copy link
Author

rChaoz commented Jan 30, 2025

Welp, turns out it was a weird line endings issue - CRLF vs LF + .gitattributes + I use Windows locally and actions used Linux. The root cause was a file imported with import string from "./path?raw"

@rChaoz rChaoz closed this as completed Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant