Skip to content

Commit

Permalink
ci: adjust baseURL
Browse files Browse the repository at this point in the history
  • Loading branch information
rifandani committed Mar 5, 2024
1 parent 1da3bb1 commit 5218e8c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ dotenv.config({
path: './.env.development',
});

const baseURL = 'http://localhost:3300';
// in CI, we run `build-and-preview` instead of `dev`
const baseURL = process.env.CI
? 'http://localhost:4173'
: 'http://localhost:3300';

/**
* See https://playwright.dev/docs/test-configuration.
Expand Down Expand Up @@ -91,7 +94,7 @@ export default defineConfig({

/* Run your local dev server before starting the tests */
webServer: {
url: process.env.CI ? 'http://localhost:4173' : baseURL,
url: baseURL,
command: process.env.CI ? 'pnpm build-and-preview' : 'pnpm dev',
reuseExistingServer: !process.env.CI,
},
Expand Down

0 comments on commit 5218e8c

Please sign in to comment.