Merge pull request #42 from trails-cool/ci-e2e-production-mode
This commit is contained in:
commit
bdb72ae141
2 changed files with 30 additions and 12 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
|
@ -175,6 +175,9 @@ jobs:
|
|||
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||
run: pnpm exec playwright install-deps chromium
|
||||
|
||||
- name: Build for production
|
||||
run: pnpm build
|
||||
|
||||
- name: Run E2E tests
|
||||
run: pnpm test:e2e
|
||||
env:
|
||||
|
|
|
|||
|
|
@ -39,16 +39,31 @@ export default defineConfig({
|
|||
},
|
||||
},
|
||||
],
|
||||
webServer: [
|
||||
{
|
||||
command: "pnpm --filter @trails-cool/journal dev",
|
||||
url: "http://localhost:3000",
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
{
|
||||
command: "pnpm --filter @trails-cool/planner dev",
|
||||
url: "http://localhost:3001",
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
],
|
||||
webServer: process.env.CI
|
||||
? [
|
||||
{
|
||||
command: "npx react-router-serve ./build/server/index.js",
|
||||
url: "http://localhost:3000",
|
||||
cwd: "./apps/journal",
|
||||
reuseExistingServer: false,
|
||||
},
|
||||
{
|
||||
command: "node --experimental-strip-types server.ts",
|
||||
url: "http://localhost:3001",
|
||||
cwd: "./apps/planner",
|
||||
reuseExistingServer: false,
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
command: "pnpm --filter @trails-cool/journal dev",
|
||||
url: "http://localhost:3000",
|
||||
reuseExistingServer: true,
|
||||
},
|
||||
{
|
||||
command: "pnpm --filter @trails-cool/planner dev",
|
||||
url: "http://localhost:3001",
|
||||
reuseExistingServer: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue