diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 00000000..9d1d9771 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,26 @@ +# The Docker image to run your workspace in. Defaults to gitpod/workspace-full +image: + file: docker/Dockerfile + # Context is optional, defaults to an empty context + context: docker + +# Command to start on workspace startup (optional) +tasks: +- command: "npm install" + +github: + prebuilds: + # enable for the master/default branch (defaults to true) + master: true + # enable for all branches in this repo (defaults to false) + branches: false + # enable for pull requests coming from this repo (defaults to true) + pullRequests: true + # enable for pull requests coming from forks (defaults to false) + pullRequestsFromForks: true + # add a "Review in Gitpod" button as a comment to pull requests (defaults to true) + addComment: false + # add a "Review in Gitpod" button to pull requests (defaults to false) + addBadge: true + # add a label once the prebuild is ready to pull requests (defaults to false) + addLabel: false diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 00000000..50937854 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,53 @@ +FROM gitpod/workspace-full:latest + +USER root +# Install chrome dependencies +RUN apt-get update && apt-get install -y \ + gconf-service \ + libappindicator3-1 \ + libasound2 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libc6 \ + libcairo2 \ + libcups2 \ + libdbus-1-3 \ + libexpat1 \ + libfontconfig1 \ + libgcc1 \ + libgconf-2-4 \ + libgdk-pixbuf2.0-0 \ + libglib2.0-0 \ + libgtk-3-0 \ + libnspr4 \ + libpango-1.0-0 \ + libpangocairo-1.0-0 \ + libstdc++6 \ + libx11-6 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxfixes3 \ + libxi6 \ + libxrandr2 \ + libxrender1 \ + libxss1 \ + libxtst6 \ + ca-certificates \ + fonts-liberation \ + libappindicator1 \ + libnss3 \ + lsb-release \ + xdg-utils \ + wget + +# Install chrome +RUN curl https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /chrome.deb +RUN dpkg -i /chrome.deb || apt-get install -yf +RUN rm /chrome.deb + +# Give back control +USER root diff --git a/karma.conf.js b/karma.conf.js index 6875592e..2e5d8c5b 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -25,7 +25,13 @@ module.exports = function (config) { colors: true, logLevel: config.LOG_INFO, autoWatch: true, - browsers: ['ChromeHeadless'], + browsers: ['ModifiedChromeHeadless'], + customLaunchers: { + ModifiedChromeHeadless: { + base: 'ChromeHeadless', + flags: ['--no-sandbox'] + } + }, singleRun: true }); };