Skip to content

Commit

Permalink
fix: playwright setup on Gitpod (EddieHubCommunity#2261)
Browse files Browse the repository at this point in the history
* fix playwright setup on gitpod

* use custom dockerfile

* use correct image

* add sudo & latest tag

* remove sudo

* only install deps in dockerfile

* use npx

* remove apt update

* change installs in dockerfile

* fix npm typo

* install chromium in gitpod yml

* use npx for playwright

* put playwright install in command section

* use playwright install-deps

* remove apt

* install chromium in node modules folder

* set playwright browsers path env var

* update terminal env vars
  • Loading branch information
dan-mba authored Nov 23, 2022
1 parent 1274cb5 commit 17cb5cf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM gitpod/workspace-mongodb:latest
RUN npx playwright install-deps chromium
1 change: 0 additions & 1 deletion .gitpod.dockerfile

This file was deleted.

11 changes: 8 additions & 3 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
---
# List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/
tasks:
- name: Install npm depdencies
init: npm i
- name: Install npm dependencies
init: |
npm ci
PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromium
command: |
gp env PLAYWRIGHT_BROWSERS_PATH=0
eval $(gp env -e)
gp ports await 27017
npm run dev
- name: Mongo
Expand All @@ -20,7 +24,8 @@ github:
addComment: false
addBadge: true

image: gitpod/workspace-mongodb
image:
file: .gitpod.Dockerfile

vscode:
extensions:
Expand Down
4 changes: 2 additions & 2 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ const config = {
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Opt out of parallel tests on CI & Gitpod. */
workers: process.env.CI || process.env.GITPOD_MEMORY ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "html",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand Down

0 comments on commit 17cb5cf

Please sign in to comment.