chore: reduce CI flakiness across webkit/macOS, ubuntu, windows (#1914)
This commit is contained in:
@@ -18,6 +18,14 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
browser: [chromium, firefox, webkit]
|
||||
exclude:
|
||||
# macos-latest is the free M1 runner (3 vCPU / 7 GB); WebKit needs more headroom.
|
||||
# Upstream's webkit matrix runs on macos-15-xlarge for the same reason.
|
||||
- os: macos-latest
|
||||
browser: webkit
|
||||
include:
|
||||
- os: macos-15-xlarge
|
||||
browser: webkit
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
@@ -45,13 +45,13 @@ public class TestRouteWebSocket {
|
||||
}
|
||||
private void setupWS(Frame target, Server server, int port, String binaryType) {
|
||||
target.navigate(server.EMPTY_PAGE);
|
||||
// No 'error' listener: WebKit fires a spurious 'error' before 'close' on non-normal closures (e.g. 1008).
|
||||
target.evaluate("({ port, binaryType }) => {\n" +
|
||||
" window.log = [];\n" +
|
||||
" window.ws = new WebSocket('ws://localhost:' + port + '/ws');\n" +
|
||||
" window.ws.binaryType = binaryType;\n" +
|
||||
" window.ws.addEventListener('open', () => window.log.push('open'));\n" +
|
||||
" window.ws.addEventListener('close', event => window.log.push(`close code=${event.code} reason=${event.reason}`));\n" +
|
||||
" window.ws.addEventListener('error', event => window.log.push(`error`));\n" +
|
||||
" window.ws.addEventListener('message', async event => {\n" +
|
||||
" let data;\n" +
|
||||
" if (typeof event.data === 'string')\n" +
|
||||
|
||||
@@ -50,7 +50,7 @@ do
|
||||
if command -v wget &> /dev/null; then
|
||||
wget $URL
|
||||
else
|
||||
curl -O $URL
|
||||
curl --retry 5 --retry-delay 2 -fL -O $URL
|
||||
fi
|
||||
unzip $FILE_NAME -d .
|
||||
rm $FILE_NAME
|
||||
|
||||
Reference in New Issue
Block a user