File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : cap-nav
2+ on : push
3+ jobs :
4+ r :
5+ runs-on : ubuntu-latest
6+ strategy :
7+ fail-fast : false
8+ matrix :
9+ variant : [main, fix]
10+ steps :
11+ - uses : actions/checkout@11d5960a326750d5838078e36cf38b85af677262
12+ with :
13+ fetch-depth : 0
14+ - uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
15+ - uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
16+ with :
17+ node-version : 22
18+ - uses : browser-actions/setup-chrome@c785b87e244131f27c9f19c1a33e2ead956ab7ce
19+ id : chrome
20+ with :
21+ chrome-version : stable
22+ - name : build
23+ run : |
24+ [ "${{ matrix.variant }}" = fix ] && git checkout -q origin/fix/capture-navigation-race
25+ git log --oneline -1
26+ bash scripts/ci/install-workspace-dependencies.sh
27+ bun run build > build.log 2>&1 || { tail -30 build.log; exit 1; }
28+ - name : runs
29+ env :
30+ HYPERFRAMES_NO_TELEMETRY : " 1"
31+ HYPERFRAMES_SKIP_SKILLS : " 1"
32+ HYPERFRAMES_BROWSER_PATH : ${{ steps.chrome.outputs.chrome-path }}
33+ run : |
34+ mkdir -p $RUNNER_TEMP/w && cd $RUNNER_TEMP/w
35+ cat > page.html <<'H'
36+ <!doctype html><html><head><title>Nav</title></head><body><h1>Hello</h1><p>navigating</p>
37+ <script>
38+ var n = Number(sessionStorage.getItem("n") || 0);
39+ if (n < 4) { sessionStorage.setItem("n", String(n + 1)); setTimeout(function () { location.reload(); }, 900); }
40+ </script></body></html>
41+ H
42+ ok=0; bad=0
43+ for i in 1 2 3 4 5 6; do
44+ set +e
45+ node $GITHUB_WORKSPACE/packages/cli/bin/hyperframes.mjs capture --file page.html -o out$i --timeout 90000 --skip-vision > cap$i.log 2>&1
46+ rc=$?
47+ set -e
48+ if grep -aq "Execution context was destroyed" cap$i.log; then bad=$((bad+1)); echo "run $i exit $rc: CONTEXT DESTROYED"; grep -a "destroyed" cap$i.log | head -2; else ok=$((ok+1)); echo "run $i exit $rc: no destroyed-context error"; tail -2 cap$i.log | cut -c1-160; fi
49+ done
50+ echo "RESULT ${{ matrix.variant }} destroyed=$bad clean=$ok"
You can’t perform that action at this time.
0 commit comments