Skip to content

Commit

Permalink
move playwright scripts to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Aug 1, 2024
1 parent 5bfe705 commit db80758
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
run: npm ci

- name: Install Playwright Browsers
run: npx playwright install --with-deps
run: npm run playwright:install

- name: Run Playwright tests
env:
CI: true
run: npx playwright test
run: npm run test:e2e

- uses: actions/upload-artifact@v4
if: always()
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"scripts": {
"start": "npm run regtest && vite",
"test": "jest --runInBand ./tests",
"test:e2e": "playwright test",
"playwright:install": "playwright install --with-deps chromium",
"dev": "vite",
"regtest": "cp src/configs/regtest.json public/config.json",
"preview": "vite preview",
Expand Down
10 changes: 5 additions & 5 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ export default defineConfig({
],

webServer: {
command: 'npm run start',
port: 5173,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
command: "npm run start",
port: 5173,
reuseExistingServer: !process.env.CI,
stdout: "pipe",
stderr: "pipe",
},
});

0 comments on commit db80758

Please sign in to comment.