File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 44 build :
55 name : Build & test
66 runs-on : ubuntu-18.04
7+ container : httptoolkit/act-build-base
78 steps :
89 - uses : actions/checkout@v2
910
2425
2526 - run : npm ci
2627
28+ - name : Install test environment
29+ run : |
30+ apt-get update
31+ apt-get install p7zip-full xterm
32+ cp test/chrome-docker-wrapper.sh /usr/local/bin/google-chrome
2733 - run : npm run build
28- - run : npm run test
29- - run : npm run test:release
34+ - run : xvfb-run npm run test
35+ - run : xvfb-run npm run test:release
3036
3137 - uses : actions/upload-artifact@v2
3238 with :
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ trap : SIGTERM SIGINT
3+
4+ # We need to inject a --no-sandbox option, because inside Docker Chrome cannot start its
5+ # sandbox, and without this it refuses to start at all.
6+ /usr/bin/google-chrome --no-sandbox " $@ " &
7+ CHROME_PID=$!
8+
9+ wait $CHROME_PID
10+
11+ WAIT_EXIT_CODE=$?
12+
13+ # If this script gets killed, kill Chrome with the same signal
14+ if [[ WAIT_EXIT_CODE -gt 128 ]]
15+ then
16+ echo kill -$(( $WAIT_EXIT_CODE - 128 )) $CHROME_PID
17+ kill -$(( $WAIT_EXIT_CODE - 128 )) $CHROME_PID
18+ fi
You can’t perform that action at this time.
0 commit comments