Skip to content
This repository was archived by the owner on Jun 3, 2020. It is now read-only.

Commit 85e17a8

Browse files
authored
Merge pull request #6 from qawolf/fix-templates
Fix templates
2 parents c6faae3 + f84ae07 commit 85e17a8

File tree

4 files changed

+52
-66
lines changed

4 files changed

+52
-66
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**

Dockerfile

+46-65
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,14 @@
1-
FROM ubuntu:18.04
1+
# Mirror until official release
2+
# https://github.com/microsoft/playwright/blob/ec3ee660430336d47a309553981eb960e49c2ede/docs/docker/Dockerfile.bionic
3+
FROM ubuntu:bionic
24

3-
RUN apt-get update &&\
4-
# install Node.js
5-
# https://github.com/nodesource/distributions
6-
apt-get -y install curl \
7-
# native node add-ons
8-
gcc g++ make &&\
9-
curl -sL https://deb.nodesource.com/setup_12.x | bash - &&\
10-
apt-get -y install build-essential nodejs \
11-
# install xvfb
12-
xvfb \
13-
# chromium dependencies
14-
# https://github.com/microsoft/playwright/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-linuxwsl
15-
gconf-service \
16-
libasound2 \
17-
libatk1.0-0 \
18-
libatk-bridge2.0-0 \
19-
libc6 \
20-
libcairo2 \
21-
libcups2 \
22-
libdbus-1-3 \
23-
libexpat1 \
24-
libfontconfig1 \
25-
libgcc1 \
26-
libgconf-2-4 \
27-
libgdk-pixbuf2.0-0 \
28-
libglib2.0-0 \
29-
libgtk-3-0 \
30-
libnspr4 \
31-
libpango-1.0-0 \
32-
libpangocairo-1.0-0 \
33-
libstdc++6 \
34-
libx11-6 \
35-
libx11-xcb1 \
36-
libxcb1 \
37-
libxcomposite1 \
38-
libxcursor1 \
39-
libxdamage1 \
40-
libxext6 \
41-
libxfixes3 \
42-
libxi6 \
43-
libxrandr2 \
44-
libxrender1 \
45-
libxss1 \
46-
libxtst6 \
47-
ca-certificates \
48-
fonts-liberation \
49-
libappindicator1 \
50-
libnss3 \
51-
lsb-release \
52-
xdg-utils \
53-
wget \
54-
libgbm1 \
55-
# webkit dependencies
56-
# https://github.com/microsoft/playwright/blob/fce3842011f9be13717bd259ca3b30cdb0b36960/.github/workflows/webkit-linux.yml#L29
57-
libwoff1 \
5+
# 1. Install node12
6+
RUN apt-get update && apt-get install -y curl && \
7+
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
8+
apt-get install -y nodejs
9+
10+
# 2. Install WebKit dependencies
11+
RUN apt-get install -y libwoff1 \
5812
libopus0 \
5913
libwebp6 \
6014
libwebpdemux2 \
@@ -64,15 +18,42 @@ RUN apt-get update &&\
6418
libhyphen0 \
6519
libgdk-pixbuf2.0-0 \
6620
libegl1 \
67-
libgles2 \
21+
libnotify4 \
22+
libxslt1.1 \
6823
libevent-2.1-6 \
24+
libgles2 \
25+
libvpx5 \
26+
# qawolf
27+
libgles2 \
6928
libnotify4 \
70-
libvpx5 \
71-
libxslt1.1 && \
72-
# free up space
73-
apt-get clean
29+
libglu1-mesa
30+
31+
32+
# 3. Install Chromium dependencies
33+
34+
RUN apt-get install -y libnss3 \
35+
libxss1 \
36+
libasound2 \
37+
# qawolf
38+
libgbm1
39+
40+
# 4. Install Firefox dependencies
41+
42+
RUN apt-get install -y libdbus-glib-1-2 \
43+
# qawolf
44+
libxext6 \
45+
libxt6 \
46+
libxtst6
47+
48+
# qawolf
49+
# Does not allow npm install
50+
# # 5. Add user so we don't need --no-sandbox in Chromium
51+
# RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
52+
# && mkdir -p /home/pwuser/Downloads \
53+
# && chown -R pwuser:pwuser /home/pwuser
54+
55+
# # 6. (Optional) Install XVFB if there's a need to run browsers in headful mode
56+
# RUN apt-get install -y xvfb
7457

75-
# disable "Chrome is being controlled by automated test software"
76-
# https://github.com/jitsi/jibri/issues/208#issuecomment-518285349
77-
# https://www.chromium.org/administrators/linux-quick-start
78-
RUN mkdir -p /etc/opt/chrome/policies/managed && echo "{ \"CommandLineFlagSecurityWarningsEnabled\": false }" > /etc/opt/chrome/policies/managed/managed_policies.json
58+
# # Run everything after as non-privileged user.
59+
# USER pwuser

static/github.hbs

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
{{#if qawolf}}
2+
name: qawolf
3+
{{else}}
14
name: playwright
5+
{{/if}}
26
on:
37
push:
48
# test every branch

test/__snapshots__/ci.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ jobs:
288288
`;
289289

290290
exports[`buildCiTemplate builds qawolf templates: github_qawolf 1`] = `
291-
"name: playwright
291+
"name: qawolf
292292
on:
293293
push:
294294
# test every branch

0 commit comments

Comments
 (0)