From 21f798e3f4e27abff4b3129c96fc17466917c5f1 Mon Sep 17 00:00:00 2001 From: Anton Kosyakov Date: Tue, 9 Apr 2019 07:37:55 +0000 Subject: [PATCH] [gitpod] fix #4832: enable electron testing Signed-off-by: Anton Kosyakov --- .gitpod.dockerfile | 22 ++++++++++++++++++++++ .gitpod.yml | 14 ++++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .gitpod.dockerfile diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile new file mode 100644 index 0000000000000..fb1e3487cb64a --- /dev/null +++ b/.gitpod.dockerfile @@ -0,0 +1,22 @@ +FROM gitpod/workspace-full-vnc:latest + +USER root +# Install custom tools, runtime, etc. +RUN apt-get update \ + # window manager + && apt-get install -y jwm \ + # electron + && apt-get install -y libgtk-3-0 libnss3 libasound2 \ + # native-keymap + && apt-get install -y libx11-dev libxkbfile-dev \ + && apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/* + +USER gitpod +# Apply user-specific settings +RUN bash -c ". .nvm/nvm.sh \ + && nvm install 10 \ + && nvm use 10 \ + && npm install -g yarn" + +# Give back control +USER root diff --git a/.gitpod.yml b/.gitpod.yml index 443adad3ff7ab..e825be16871cb 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,8 +1,18 @@ +image: + file: .gitpod.dockerfile ports: - port: 3000 +- port: 6080 + onOpen: ignore +- port: 5900 + onOpen: ignore tasks: -- init: nvm install 10 && nvm use 10 && yarn - command: yarn --cwd examples/browser start ../.. +- init: yarn + command: > + # start window manager + jwm & && + # start browser example + yarn --cwd examples/browser start ../.. github: prebuilds: pullRequestsFromForks: true