charmbracelet / charmbracelet/x

ci: fix `exp/teatest` tests on windows

Open
#389 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
314
Forks
94
Avg merge
3d 22h
Merged PRs (30d)
2

Description

We did a fix recently about golden files on Windows: https://github.com/charmbracelet/x/pull/365

That fixed many tests on Windows, but on this repository two started failing. We need to figure it out if there is a better way this the below to handle `\r\n` golden files checkout by Git on Windows.

https://github.com/charmbracelet/x/blob/59292a315e5849f674e95c50bd4d2becf9e8ce7f/exp/golden/golden.go#L78-L80

Perhaps we can remove the fix done on #365 and replace it by a `.gitattributes` file instructing Git to preserve `*.golden` files as is? We'd need to do this on all relevant repositories, though, not only on this one.

Contributor guide

Open the contributing guide

Research direction

Start with the two failing exp/teatest tests on Windows and inspect exp/golden/golden.go at lines 78–80, along with the change in pull request #365. Compare the current golden-file handling with the proposed .gitattributes approach, then run the affected tests on Windows and confirm that the golden files behave consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, go
Domain
ci-cd, operating-systems, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.