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 test only] Cypress E2E Windows Runner #2227
Conversation
Runner is using PowerShell as default: |
Setting the shell explicitly to bash seemed to be working. However, it errors when starting the dev server --> |
Well, I think Cypress is running correctly! I ran a test skipping the dev server start, but everything seemed to work well up until stalling out waiting for localhost:8910 Here's the run. And screenshot below: |
.github/workflows/e2e.yaml
Outdated
- name: Start server in background | ||
shell: bash | ||
run: yarn rw dev & | ||
working-directory: ${{ steps.createpath.outputs.project_path }} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tobbe can you help me diagnose why this would fail on Windows bash? Actually, what would be ideal is to instead use scripts for each of these steps that work on Powershell. Possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd try something like this:
run: |
echo "${{ steps.createpath.outputs.project_path }}"
cd "${{ steps.createpath.outputs.project_path }}"
yarn rw dev &
It'll tell us
- Do we even get a valid path to this step?
- Does it look right?
- Does it help to start the server when standing in the directory as opposed to trying to set cwd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tobbe well, that worked. Question: what would the Powershell version of this command be (if possible)?
Next step: can I have the Cypress action run with Powershell... gonna go check some docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo
and cd
are both commands PS understands. So if it's GH that does the "${{ steps.createpath.outputs.project_path }}"
substitution to a proper value, it should all just work in PS as well. But if GH is doing some kind of injection of variables into the shell, and it's actually bash that does the substitution then I don't know.
Test summaryRun details
View run in Cypress Dashboard ➡️ FailuresThis comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@thedavidprice Now that the tests actually start running - what if you keep using bash, and then try replacing I did the experiment over in my PR instead. Here's the run https://github.com/redwoodjs/redwood/pull/2228/checks?check_run_id=2295726909 In the step before, it was on the C: drive. Now it's trying to run on the D: drive. Not sure what GH or cy is doing there really |
Will Cypress run on Windows?