mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
fix(playwright.config): update web server configuration to use URL
- Changed the web server configuration to specify the URL as 'http://localhost:3000' for improved clarity in local development. </message> <message>feat(ci-pipeline): add artifact upload and download steps in CI workflow - Introduced steps to upload the build output as an artifact after the build job. - Added a step to download the build output artifact before running Playwright tests, ensuring the tests have access to the latest build.
This commit is contained in:
parent
024a8a4574
commit
24edc39847
2 changed files with 12 additions and 3 deletions
13
.github/workflows/ci-pipeline.yml
vendored
13
.github/workflows/ci-pipeline.yml
vendored
|
@ -75,6 +75,12 @@ jobs:
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
|
||||||
- name: Build project
|
- name: Build project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
- name: Upload build output
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: |
|
||||||
|
dist
|
||||||
|
|
||||||
playwright:
|
playwright:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -96,7 +102,10 @@ jobs:
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: npx playwright install --with-deps
|
run: npx playwright install --with-deps
|
||||||
- name: Build project
|
- name: Download build output
|
||||||
run: npm run build
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: build
|
||||||
|
path: dist
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: npx playwright test
|
run: npx playwright test
|
|
@ -66,7 +66,7 @@ export default defineConfig({
|
||||||
/* Run your local dev server before starting the tests */
|
/* Run your local dev server before starting the tests */
|
||||||
webServer: {
|
webServer: {
|
||||||
command: process.env.CI ? 'npm run start' : 'npm run dev',
|
command: process.env.CI ? 'npm run start' : 'npm run dev',
|
||||||
port: 3000,
|
url: 'http://localhost:3000',
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue