Skip to content

Commit

Permalink
Use pnpm scripts to run playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
gauntface committed Nov 2, 2024
1 parent 7cca0f8 commit 234cd92
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 7 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@ jobs:
- name: Install NPM Deps
run: pnpm install

- name: Test
run: pnpm run test:ci

- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm exec playwright test
- name: Test
run: pnpm run test:ci

- name: Upload Playwright report
uses: actions/upload-artifact@v4
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"dev": "vite",
"build": "vite build",
"build:dev": "vite build --mode development",
"test": "npm run lint && npm run vitest",
"test:ci": "npm run lint:ci && npm run vitest:ci",
"test": "npm run lint && npm run vitest && test:e2e",
"test:ci": "npm run lint:ci && npm run vitest:ci && test:e2e",
"test:e2e": "playwright test",
"test:e2e:debug": "playwright test --debug",
"test:e2e:ui": "playwright test --ui",
Expand Down

0 comments on commit 234cd92

Please sign in to comment.