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

Add smoke test for rw dev and rw serve commands #4259

Closed
thedavidprice opened this issue Jan 24, 2022 · 2 comments · Fixed by #4497
Closed

Add smoke test for rw dev and rw serve commands #4259

thedavidprice opened this issue Jan 24, 2022 · 2 comments · Fixed by #4497
Assignees

Comments

@thedavidprice
Copy link
Contributor

thedavidprice commented Jan 24, 2022

cc @jtoar @dac09

Storybook has two command options that, when used together, make it simple to test the start process within the context of CI. See --ci and --smoke-test via Storybook CLI Doc:

  • ci: CI mode (skip interactive prompts, don't open browser)
  • smoke-test: Exit (success) after successful start

Thanks to @virtuoushub's persistent work on #3515, we are now using these Storybook options to test in CI instead of the previous complicated sequence of steps.

If we added similar capability via and option/script/GH-action to rw dev and rw serve, it would greatly simplify testing these commands and processes within the context of CI:

  • confirm all processes started successfully (no warnings or errors)
  • confirm web assets are being served
  • confirm API endpoint is healthy
  • confirm GraphQL is healthy
  • IF all status = success, then exit gracefully
  • ELSE process.exit(1)

Note: this is related to my work on #3914

@dac09
Copy link
Collaborator

dac09 commented Feb 16, 2022

@thedavidprice as discussed during CTM, I don't the see the value in shipping the --ci or --smoketest option to the end users. I think we're better off having a simple test with playwright.

Guess who had this stuff in progress and working back in August last year? #3044 - time to revive the old code.

Do you want to update the issue to reflect this?

@thedavidprice thedavidprice changed the title Add --ci option to rw dev and rw serve commands Add smoke test for rw dev and rw serve commands Feb 16, 2022
@thedavidprice
Copy link
Contributor Author

Thanks @dac09! I did update the title and description. I agree that not adding the option to the commands is ideal for our CI purposes. However, I do think that adding an option like yarn rw serve --smoke-test is also useful for devs who could add this to CI for their own projects. (Agreed yarn rw dev not so helpful...)

But for now, I don't really care how we execute it as long as I can use it as a "run" step in a GH Action on both Windows and Ubuntu. So that's why I was also thinking about trying to build a script we could use in a GH Action, e.g. like this "check" action @jtoar recently created here.

@jtoar and I did get started on the CI workflow itself today, which is where I'd like to add the checks for rw dev and rw serve as additional run steps:

I wanted to to reproduce the Prisma installation error on Windows, and finally just started the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Archived
Development

Successfully merging a pull request may close this issue.

2 participants