Closed
Description
#288 enables running E2E tests via playwright on both MacOS and Ubuntu.
However, unfortunately, the E2E run does not include in Windows.
The main blocker is that we currently run our E2E tests against a local coderd
binary, which means that binary has to be built.
Our make build
step is not cross-platform compatible:
- The
yarn_install.sh
script does not work properly on Windows, when called from a Makefile. It results in this error:
./scripts/yarn_install.sh
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Microsoft Store:
https://aka.ms/wslstore
mingw32-make: *** [Makefile:[10](https://github.com/coder/coder/runs/5368058980?check_suite_focus=true#step:8:10)2: site/out] Error 1
https://github.com/coder/coder/runs/5368058980?check_suite_focus=true#step:8:7
- Beyond that, the
yarn install
and other build commands for front-end, even when called directly from the Makefile end up having errors - likely due to being run in a WSL context instead of 'real' Windows:
cd site && yarn install
yarn install v1.22.1[7](https://github.com/coder/coder/runs/5368562727?check_suite_focus=true#step:8:7)
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.5.1.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "D:\\a\\coder\\coder\\site\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Entering debug mode. Use h or ? for help.
https://github.com/coder/coder/runs/5368562727?check_suite_focus=true#step:8:23
Possible discussion / solution here: https://github.community/t/yarn-esockettimedout-on-windows/118776/4
With those two issues unblocked - we should be able to build coderd
and run the E2E tests.
There are a few other possible solutions:
- We could cross-compile all supported architectures from a Ubuntu machine -> store them as GH artifacts -> consume the built binary on Windows. In this case, Windows wouldn't actually build the binary, but it would consume it.
- We could supply a happy path for building on Windows (ie, a
build_win.bat
).