Astro Info
Astro v3.6.4
Node v18.19.0
System macOS (x64)
Package Manager npm
Output static
Adapter none
Integrations astro-expressive-code
@astrojs/mdx
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Hi there! I'm really not sure if this is a problem with Astro, PlayWright's webServer or GitHub actions 😅
I have a little package where I create the docs with Astro and also use the same docs to test my package through PlayWright (see the config). This is what I tried first for PlayWright's webServer.command (contrived example, actually the commands are in npm scripts to make sure they are being run from the root of my package):
astro preview --root docs
It was working nicely locally, but as soon as I put it in a GitHub action, playWright was hanging indefinitely.
What's the expected result?
The PlayWright tests should be able to resolve the provided server (created by astro preview)
Turns out first building Astro before serving the preview fixed my issue in CI:
astro build --root docs && astro preview --root docs
Now I'm curious: What's the difference here? Doesn't astro preview also build the astro site?
There is a related thread over at PlayWright and I'll happily close this issue if the astro maintainers think this is an issue with PlayWright. But then I'd still love to learn why combining astro build and astro preview isn't the same as astro preview alone.
Link to Minimal Reproducible Example
n/a
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Hi there! I'm really not sure if this is a problem with Astro, PlayWright's
webServeror GitHub actions 😅I have a little package where I create the docs with Astro and also use the same docs to test my package through PlayWright (see the config). This is what I tried first for PlayWright's
webServer.command(contrived example, actually the commands are in npm scripts to make sure they are being run from the root of my package):It was working nicely locally, but as soon as I put it in a GitHub action, playWright was hanging indefinitely.
What's the expected result?
The PlayWright tests should be able to resolve the provided server (created by
astro preview)Turns out first building Astro before serving the preview fixed my issue in CI:
astro build --root docs && astro preview --root docsNow I'm curious: What's the difference here? Doesn't
astro previewalso build the astro site?There is a related thread over at PlayWright and I'll happily close this issue if the astro maintainers think this is an issue with PlayWright. But then I'd still love to learn why combining
astro buildandastro previewisn't the same asastro previewalone.Link to Minimal Reproducible Example
n/a
Participation