ci: add windows-latest to e2e job

NI
4mo ago
+24-10

Part of https://github.com/OpenAPITools/openapi-generator-cli/pull/759. I think it is not necessary to separate the e2e job for Windows and Linux with macOS.

If we don't remove process.env.PWD || process.env.INIT_CWD, part of test cd ./foo && npm run oa:generate will fail for Windows.

close https://github.com/OpenAPITools/openapi-generator-cli/pull/815, will be outdated
resolve https://github.com/OpenAPITools/openapi-generator-cli/issues/624, no process.env.INIT_CWD no problem
related with https://github.com/OpenAPITools/openapi-generator-cli/issues/690, was discussion about cwd


Summary by cubic

Add Windows to the E2E CI and make cwd detection OS-agnostic so generator tests run reliably on Windows. Fixes failures in the Windows path flow when running generation commands.

  • Bug Fixes
    • generator-cli: use process.cwd() only (drop PWD/INIT_CWD) to fix Windows path handling during commands like cd ./foo && npm run oa:generate.
    • E2E workflow: add windows-latest; set Yarn bin to PATH; set OPENAPI_GENERATOR_CLI_SEARCH_URL via $GITHUB_ENV; split test steps for cross-platform compatibility.