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/dev: Windows support #80

Merged
merged 5 commits into from
Feb 16, 2023
Merged

ci/dev: Windows support #80

merged 5 commits into from
Feb 16, 2023

Conversation

webstech
Copy link
Contributor

This patch series provides support for running development and the CI on Windows. It includes changes listed in issue #26 (and includes some that were missed).

  1. ci: force linends to lf on all platforms
    Windows has issues running bash scripts with crlf.

  2. maint: replace link with actual file
    git may not create links for the test file. Other test files are not links so maybe this does not need to be one either.

  3. maint: change links to relative paths
    git does not always create links so using relative paths expands on WIndows compatability.

  4. ci: do not rely on shebang support
    Running on Windows needs the command to be specified in package.json.

  5. ci: windows support and windows specific test
    Remove some shebang assumptions.
    Added test:safe:esm which runs some tests for Windows in the cmd shell. test:safe:bats tests run under bash so they do not test WIndows pathname issues. This is the test mentioned in pr fix: use file URL for esm import and remove node version check #75.

Tested on Windows cmd and wsl.

No offence if some of the patches are not accepted (or none) or need changes. This provides a record for the future. If the changes are accepted, there may be some link cleanup to be done.

@webstech
Copy link
Contributor Author

webstech commented Feb 14, 2023

.gitattributes was two lines for some reason (created with echo command). Corrected but it still fails. Cloned a fresh copy and had the same issue. I had saved files locally in my working clone with lf but assumed attributes would look after things. Researching.

Update: The doc indicates git checks for .gitattributes in the working tree and the index. Speculating that until the commit is part of the main branch the file will not be seen and enforced. I can open a separate PR or you (@searls) could pull it into your main and push it in. Cloning a local repo of teenytest gets the proper eol values. Let me know how you want to proceed.

WIndows has issues running bash scripts with crlf.

Signed-off-by: Chris. Webster <[email protected]>
git may not create links for the test file.  Other test files are not
links so maybe this does not need to be one either.

Signed-off-by: Chris. Webster <[email protected]>
git does not always create links so using relative paths expands on
WIndows compatability.

Signed-off-by: Chris. Webster <[email protected]>
Running on Windows needs the command to be specified in `package.json`.

Signed-off-by: Chris. Webster <[email protected]>
Remove some shebang assumptions.

Added test:safe:esm which runs some tests for Windows in the cmd shell.
test:safe:bats tests run under bash so they do not test WIndows
pathname  issues.

Signed-off-by: Chris. Webster <[email protected]>
@searls searls merged commit 3c121c3 into testdouble:main Feb 16, 2023
@searls
Copy link
Member

searls commented Feb 16, 2023

Merged! I'll take your word for it @webstech. Appreciate your patience in my responses, and I am so grateful for your persistence in this

@searls
Copy link
Member

searls commented Feb 16, 2023

It looks like this still failed on Windows after hitting main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants