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

ci: add Windows testing to CI #132

Merged
merged 3 commits into from
Jan 20, 2022

Conversation

owenvoke
Copy link
Member

@owenvoke owenvoke commented Jan 7, 2022

Closes #129

if: ${{ matrix.os }} == 'windows-latest'
run: |
git config --global core.autocrlf false
git config --global core.eol lf
Copy link
Contributor

@MasterOdin MasterOdin Jan 7, 2022

Choose a reason for hiding this comment

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

What test was failing if this was not included? I am of the opinion that if this is necessary in CI to get it to pass, then the repo itself is broken, and we should be changing the .gitattributes file so that using Windows is not broken for contributors in some subtle way.

Copy link
Member Author

@owenvoke owenvoke Jan 7, 2022

Choose a reason for hiding this comment

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

All tests fail on Windows (if using autocrlf) as the line endings are converted to CRLF. I did think about adding it to the .gitattributes, however wasn't sure if that was the best place. Guess we could add text eol=lf to line 1 of the .gitattributes, instead of text=auto, but that seems kind of wrong...

I've done a test branch here to try that out... 👍🏻
https://github.com/owenvoke/tldr-lint/actions/runs/1668369649

Copy link
Member Author

Choose a reason for hiding this comment

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

@MasterOdin, looks like that also works. Shall I add that commit to this branch? 👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, please. If text eol=lf is necessary for the random Windows users to be able to run the tests successfully regardless of their configuration, then so be it. Better than including in the README a block on "if you want to work on this repo on windows, run these git config settings first..."

Copy link
Member Author

Choose a reason for hiding this comment

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

Applied and pushed 👍🏻

Copy link
Member

Choose a reason for hiding this comment

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

For previous PRs dealing with the line ending configuration, see also #35/#43, and #45.

Copy link
Contributor

@MasterOdin MasterOdin left a comment

Choose a reason for hiding this comment

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

Looks good 👍

@@ -19,7 +19,7 @@ jobs:
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id }}
with:
access_token: ${{ github.token }}

Copy link
Contributor

Choose a reason for hiding this comment

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

What's the change here? My phone doesn't show anything, just want to confirm not adding spaces or something.

Copy link
Member

Choose a reason for hiding this comment

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

It's removing whitespace (the same amount as the indent of the line above it).

Copy link
Member Author

Choose a reason for hiding this comment

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

As waldyrious mentions, it's just removing whitespace that was included before. 👍🏻

Copy link
Member Author

Choose a reason for hiding this comment

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

@MasterOdin, is this ok to merge?

@MasterOdin MasterOdin merged commit fc3eda7 into tldr-pages:main Jan 20, 2022
@owenvoke owenvoke deleted the feature/windows-ci branch January 20, 2022 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Windows to the CI testing matrix
3 participants