Skip to content

Commit

Permalink
fix e2e tests on CI
Browse files Browse the repository at this point in the history
We had different versions of playwright for installing the browsers than for running the tests, so it could not find them.

Moved the installation to a pre- step, since when the browsers are already installed this command is very fast.
  • Loading branch information
petebacondarwin committed Sep 13, 2024
1 parent e795a1e commit 316425a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ jobs:
node-version: lts/*
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm dlx playwright install --with-deps
- name: Run Playwright tests
run: pnpm e2e
- uses: actions/upload-artifact@v4
Expand Down
5 changes: 3 additions & 2 deletions next/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
"build:worker": "builder",
"dev:worker": "wrangler dev --port 8770",
"preview:worker": "pnpm build:worker && pnpm dev:worker",
"pree2e": "playwright install --with-deps",
"e2e": "playwright test"
},
"dependencies": {
"next": "14.2.5",
"builder": "workspace:*",
"next": "14.2.5",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@playwright/test": "^1.46.1",
"@playwright/test": "1.47.0",
"@types/node": "^22.2.0",
"node-url": "npm:url@^0.11.4",
"wrangler": "3.77.0"
Expand Down
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 316425a

Please sign in to comment.