Skip to content

Commit 9caa61a

Browse files
authored
devops: upload logs for test runs (#1015)
1 parent 3656403 commit 9caa61a

File tree

1 file changed

+80
-10
lines changed

1 file changed

+80
-10
lines changed

.github/workflows/tests.yml

Lines changed: 80 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@ jobs:
2525
sudo apt-get update
2626
sudo apt-get install libgbm-dev xvfb
2727
- run: npm install
28-
- run: xvfb-run --auto-servernum npm run ccoverage
28+
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
29+
# Wrap `npm run` in a subshell to redirect STDERR to file.
30+
- run: xvfb-run --auto-servernum -- bash -c "npm run ccoverage 2>./chromium-linux-testrun.log"
31+
env:
32+
DEBUG: "*"
33+
- uses: actions/upload-artifact@v1
34+
if: failure()
35+
with:
36+
name: chromium-linux-testrun.log
37+
path: chromium-linux-testrun.log
2938

3039
chromium_mac:
3140
name: "Chromium Mac"
@@ -36,7 +45,14 @@ jobs:
3645
with:
3746
node-version: 10.15
3847
- run: npm install
39-
- run: npm run ctest
48+
- run: npm run ctest 2>./chromium-mac-testrun.log
49+
env:
50+
DEBUG: "*"
51+
- uses: actions/upload-artifact@v1
52+
if: failure()
53+
with:
54+
name: chromium-mac-testrun.log
55+
path: chromium-mac-testrun.log
4056

4157
chromium_win:
4258
name: "Chromium Win"
@@ -47,7 +63,15 @@ jobs:
4763
with:
4864
node-version: 10.15
4965
- run: npm install
50-
- run: npm run ctest
66+
- run: npm run ctest 2>./chromium-win-testrun.log
67+
shell: bash
68+
env:
69+
DEBUG: "*"
70+
- uses: actions/upload-artifact@v1
71+
if: failure()
72+
with:
73+
name: chromium-win-testrun.log
74+
path: chromium-win-testrun.log
5175

5276
webkit_linux:
5377
name: "WebKit Linux"
@@ -63,7 +87,16 @@ jobs:
6387
sudo apt-get install libwoff1 libopus0 libwebp6 libwebpdemux2 libenchant1c2a libgudev-1.0-0 libsecret-1-0 libhyphen0 libgdk-pixbuf2.0-0 libegl1 libgles2 libevent-2.1-6 libnotify4 libxslt1.1
6488
sudo apt-get install xvfb
6589
- run: npm install
66-
- run: xvfb-run --auto-servernum npm run wcoverage
90+
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
91+
# Wrap `npm run` in a subshell to redirect STDERR to file.
92+
- run: xvfb-run --auto-servernum -- bash -c "npm run wcoverage 2>./webkit-linux-testrun.log"
93+
env:
94+
DEBUG: "*,-pw:wrapped*"
95+
- uses: actions/upload-artifact@v1
96+
if: failure()
97+
with:
98+
name: webkit-linux-testrun.log
99+
path: webkit-linux-testrun.log
67100

68101
webkit_mac:
69102
name: "WebKit Mac"
@@ -74,7 +107,14 @@ jobs:
74107
with:
75108
node-version: 10.15
76109
- run: npm install
77-
- run: npm run wtest
110+
- run: npm run wtest 2>./webkit-mac-testrun.log
111+
env:
112+
DEBUG: "*,-pw:wrapped*"
113+
- uses: actions/upload-artifact@v1
114+
if: failure()
115+
with:
116+
name: webkit-mac-testrun.log
117+
path: webkit-mac-testrun.log
78118

79119
webkit_win:
80120
name: "WebKit Win"
@@ -85,9 +125,15 @@ jobs:
85125
with:
86126
node-version: 10.15
87127
- run: npm install
88-
- run: npm run wtest -- --verbose
128+
- run: npm run wtest -- --verbose 2>./webkit-win-testrun.log
129+
shell: bash
89130
env:
90-
DEBUG: "*launch*"
131+
DEBUG: "*,-pw:wrapped*"
132+
- uses: actions/upload-artifact@v1
133+
if: failure()
134+
with:
135+
name: webkit-win-testrun.log
136+
path: webkit-win-testrun.log
91137

92138
firefox_linux:
93139
name: "Firefox Linux"
@@ -102,7 +148,16 @@ jobs:
102148
sudo apt-get update
103149
sudo apt-get install xvfb
104150
- run: npm install
105-
- run: xvfb-run --auto-servernum npm run fcoverage
151+
# XVFB-RUN merges both STDOUT and STDERR, whereas we need only STDERR
152+
# Wrap `npm run` in a subshell to redirect STDERR to file.
153+
- run: xvfb-run --auto-servernum -- bash -c "npm run fcoverage 2>./firefox-linux-testrun.log"
154+
env:
155+
DEBUG: "*"
156+
- uses: actions/upload-artifact@v1
157+
if: failure()
158+
with:
159+
name: firefox-linux-testrun.log
160+
path: firefox-linux-testrun.log
106161

107162
firefox_mac:
108163
name: "Firefox Mac"
@@ -113,7 +168,14 @@ jobs:
113168
with:
114169
node-version: 10.15
115170
- run: npm install
116-
- run: npm run ftest
171+
- run: npm run ftest 2>./firefox-mac-testrun.log
172+
env:
173+
DEBUG: "*"
174+
- uses: actions/upload-artifact@v1
175+
if: failure()
176+
with:
177+
name: firefox-mac-testrun.log
178+
path: firefox-mac-testrun.log
117179

118180
firefox_win:
119181
name: "Firefox Win"
@@ -124,4 +186,12 @@ jobs:
124186
with:
125187
node-version: 10.15
126188
- run: npm install
127-
- run: npm run ftest
189+
- run: npm run ftest 2>./firefox-win-testrun.log
190+
shell: bash
191+
env:
192+
DEBUG: "*"
193+
- uses: actions/upload-artifact@v1
194+
if: failure()
195+
with:
196+
name: firefox-win-testrun.log
197+
path: firefox-win-testrun.log

0 commit comments

Comments
 (0)