Merge branch 'main' into dependabot/npm_and_yarn/jsdom-30.1.3

This commit is contained in:
Frederic Jung 2026-11-05 20:26:08 +01:00 • committed by GitHub
commit bf6090f413
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 16 additions and 15 deletions

View file

@ -70,29 +70,29 @@ jobs:
until_up() { for i in $(seq 1 60); do curl -s -o /dev/null "$1" && return 0; sleep 1; done; docker logs "$2"; exit 1; }
# Headless, with a token: refused without it, answered with it.
docker run -d --name h -p 127.0.0.1:7777:7777 -e MCP_MODE=headless -e SOT_MCP_TOKEN=ci-token sot:test
until_up http://127.0.0.1:7777/ h
docker run -d --name sot-h -p 127.0.0.1:7777:7777 -e MCP_MODE=headless -e SOT_MCP_TOKEN=ci-token sot:test
until_up http://127.0.0.1:7777/ sot-h
test "$(mcp)" = 401
test "$(mcp -H 'authorization: Bearer ci-token')" = 200
grep -q serverInfo /tmp/out
docker rm -f h
docker rm -f sot-h
# No token given: the container makes one, says so, and wants it.
docker run -d --name t -p 127.0.0.1:7777:7777 -e MCP_MODE=headless sot:test
until_up http://127.0.0.1:7777/ t
docker run -d --name sot-t -p 127.0.0.1:7777:7777 -e MCP_MODE=headless sot:test
until_up http://127.0.0.1:7777/ sot-t
test "$(mcp)" = 401
tok=$(docker logs t 2>&1 | sed -n "s/.*this run's token is //p" | head -1)
tok=$(docker logs sot-t 2>&1 | sed -n "s/.*this run's token is //p" | head -1)
test -n "$tok"
test "$(mcp -H "authorization: Bearer $tok")" = 200
docker rm -f t
docker rm -f sot-t
# Browser mode: the development page and the MCP server.
docker run -d --name b -p 127.0.0.1:8080:8080 -p 127.0.0.1:7777:7777 -e SOT_MCP_TOKEN=ci-token sot:test
until_up http://127.0.0.1:8080/ b
docker run -d --name sot-b -p 127.0.0.1:8080:8080 -p 127.0.0.1:7777:7777 -e SOT_MCP_TOKEN=ci-token sot:test
until_up http://127.0.0.1:8080/ sot-b
test "$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:8080/)" = 200
until_up http://127.0.0.1:7777/ b
until_up http://127.0.0.1:7777/ sot-b
test "$(mcp -H 'authorization: Bearer ci-token')" = 200
docker rm -f b
docker rm -f sot-b
# The server runs as node, not root.
test "$(docker run --rm --entrypoint id sot:test -u)" != 0

View file

@ -17,7 +17,7 @@ jobs:
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
with:
name: perf
run-id: ${{ github.event.workflow_run.id }}

View file

@ -48,7 +48,7 @@ jobs:
env:
PR: ${{ github.event.pull_request.number }}
run: echo "$PR" > pr-number.txt
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: github.event_name == 'pull_request'
with:
name: perf

View file

@ -57,8 +57,9 @@ test('the slow-city warning box does not restyle the yellow progress bars', () =
const { ev, errors } = load();
// .bar.warn is the yellow bar; the latency box once used a plain .warn class and padded every yellow bar
const st = JSON.parse(ev(`(()=>{const b=document.createElement('div');b.className='bar warn';const w=document.createElement('div');w.className='latwarn';document.body.append(b,w);
const a=getComputedStyle(b),c=getComputedStyle(w);return JSON.stringify({bar:a.paddingTop+a.paddingLeft,box:c.paddingTop});})()`));
assert.ok(!st.bar || st.bar === '0px0px', `yellow bars have no padding (${st.bar})`);
const a=getComputedStyle(b),c=getComputedStyle(w);return JSON.stringify({bar:[a.paddingTop,a.paddingLeft],box:c.paddingTop});})()`));
// No padding reads as '', '0px' or (jsdom 30) '0', depending on the DOM: any of them is zero.
assert.ok(st.bar.every((v) => !v || parseFloat(v) === 0), `yellow bars have no padding (${st.bar})`);
assert.equal(st.box, '8px', 'the warning box keeps its own');
assert.deepEqual(errors, []);
});